[PATCH i915 v3 2/2] i915: wait for fence in prepare_plane_fb

Alex Goins agoins at nvidia.com
Thu Nov 12 17:49:29 PST 2015


In intel_prepare_plane_fb, if fb is backed by dma-buf, wait for fence.

Signed-off-by: Alex Goins <agoins at nvidia.com>
---
 drivers/gpu/drm/i915/intel_display.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index acec108a..36c558a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13345,6 +13345,13 @@ intel_prepare_plane_fb(struct drm_plane *plane,
 	if (!obj)
 		return 0;
 
+	/* For framebuffer backed by dmabuf, wait for fence */
+	if (obj->base.dma_buf) {
+		reservation_object_wait_timeout_rcu(
+			obj->base.dma_buf->resv,
+			true, false, msecs_to_jiffies(96));
+	}
+
 	mutex_lock(&dev->struct_mutex);
 
 	if (plane->type == DRM_PLANE_TYPE_CURSOR &&
-- 
1.9.1



More information about the dri-devel mailing list