Skip to content

Commit 3c28ff2

Browse files
AlexGoinsNVmlankhorst
authored andcommitted
i915: wait for fence in prepare_plane_fb
In intel_prepare_plane_fb, if fb is backed by dma-buf, wait for exclusive fence v2: First commit v3: Remove object_name_lock acquire Move wait from intel_atomic_commit() to intel_prepare_plane_fb() v4: Wait only on exclusive fences, interruptible with no timeout v5: Style tweaks to more closely match rest of file v6: Properly handle interrupted waits v7: No change v8: No change Link: https://patchwork.kernel.org/patch/7704181/ Signed-off-by: Alex Goins <agoins@nvidia.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
1 parent fd8e058 commit 3c28ff2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13690,6 +13690,17 @@ intel_prepare_plane_fb(struct drm_plane *plane,
1369013690
return ret;
1369113691
}
1369213692

13693+
/* For framebuffer backed by dmabuf, wait for fence */
13694+
if (obj && obj->base.dma_buf) {
13695+
ret = reservation_object_wait_timeout_rcu(obj->base.dma_buf->resv,
13696+
false, true,
13697+
MAX_SCHEDULE_TIMEOUT);
13698+
if (ret == -ERESTARTSYS)
13699+
return ret;
13700+
13701+
WARN_ON(ret < 0);
13702+
}
13703+
1369313704
if (!obj) {
1369413705
ret = 0;
1369513706
} else if (plane->type == DRM_PLANE_TYPE_CURSOR &&

0 commit comments

Comments
 (0)