diff options
author | Christian König <christian.koenig@amd.com> | 2021-09-13 14:24:08 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-11-17 16:24:37 +0300 |
commit | 5e9ddbdcf730a2671b9a07c6de45b53f139995af (patch) | |
tree | abfee6ba7ee6478a90d0d447272b1e50abebd4b2 | |
parent | 1b5bdf071e62ac57ad699d60ddbd392b266f58b0 (diff) | |
download | linux-5e9ddbdcf730a2671b9a07c6de45b53f139995af.tar.xz |
drm/i915: use new cursor in intel_prepare_plane_fb v2
Simplifying the code a bit.
v2: rebased
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20211116102431.198905-5-christian.koenig@amd.com
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_atomic_plane.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c index 0be8c00e3db9..cdc68fb51ba6 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c @@ -738,6 +738,7 @@ intel_prepare_plane_fb(struct drm_plane *_plane, i915_gem_object_wait_priority(obj, 0, &attr); if (!new_plane_state->uapi.fence) { /* implicit fencing */ + struct dma_resv_iter cursor; struct dma_fence *fence; ret = i915_sw_fence_await_reservation(&state->commit_ready, @@ -748,12 +749,12 @@ intel_prepare_plane_fb(struct drm_plane *_plane, if (ret < 0) goto unpin_fb; - fence = dma_resv_get_excl_unlocked(obj->base.resv); - if (fence) { + dma_resv_iter_begin(&cursor, obj->base.resv, false); + dma_resv_for_each_fence_unlocked(&cursor, fence) { add_rps_boost_after_vblank(new_plane_state->hw.crtc, fence); - dma_fence_put(fence); } + dma_resv_iter_end(&cursor); } else { add_rps_boost_after_vblank(new_plane_state->hw.crtc, new_plane_state->uapi.fence); |