diff options
Diffstat (limited to 'sys/dev/pci/drm/i915/display/intel_fb_pin.c')
-rw-r--r-- | sys/dev/pci/drm/i915/display/intel_fb_pin.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915/display/intel_fb_pin.c b/sys/dev/pci/drm/i915/display/intel_fb_pin.c index fffd568070d..a131656757f 100644 --- a/sys/dev/pci/drm/i915/display/intel_fb_pin.c +++ b/sys/dev/pci/drm/i915/display/intel_fb_pin.c @@ -254,6 +254,16 @@ int intel_plane_pin_fb(struct intel_plane_state *plane_state) return PTR_ERR(vma); plane_state->ggtt_vma = vma; + + /* + * Pre-populate the dma address before we enter the vblank + * evade critical section as i915_gem_object_get_dma_address() + * will trigger might_sleep() even if it won't actually sleep, + * which is the case when the fb has already been pinned. + */ + if (phys_cursor) + plane_state->phys_dma_addr = + i915_gem_object_get_dma_address(intel_fb_obj(fb), 0); } else { struct intel_framebuffer *intel_fb = to_intel_framebuffer(fb); |