Skip to content

Commit fa78e36

Browse files
drm/amdgpu: stop getting excl fence separately
Just grab all fences for the display flip in one go. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2cbb8d4 commit fa78e36

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@ struct amdgpu_flip_work {
457457
uint64_t base;
458458
struct drm_pending_vblank_event *event;
459459
struct amdgpu_bo *old_abo;
460-
struct dma_fence *excl;
461460
unsigned shared_count;
462461
struct dma_fence **shared;
463462
struct dma_fence_cb cb;

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ static void amdgpu_display_flip_work_func(struct work_struct *__work)
8383
unsigned i;
8484
int vpos, hpos;
8585

86-
if (amdgpu_display_flip_handle_fence(work, &work->excl))
87-
return;
88-
8986
for (i = 0; i < work->shared_count; ++i)
9087
if (amdgpu_display_flip_handle_fence(work, &work->shared[i]))
9188
return;
@@ -203,7 +200,7 @@ int amdgpu_display_crtc_page_flip_target(struct drm_crtc *crtc,
203200
goto unpin;
204201
}
205202

206-
r = dma_resv_get_fences(new_abo->tbo.base.resv, &work->excl,
203+
r = dma_resv_get_fences(new_abo->tbo.base.resv, NULL,
207204
&work->shared_count, &work->shared);
208205
if (unlikely(r != 0)) {
209206
DRM_ERROR("failed to get fences for buffer\n");
@@ -253,7 +250,6 @@ int amdgpu_display_crtc_page_flip_target(struct drm_crtc *crtc,
253250

254251
cleanup:
255252
amdgpu_bo_unref(&work->old_abo);
256-
dma_fence_put(work->excl);
257253
for (i = 0; i < work->shared_count; ++i)
258254
dma_fence_put(work->shared[i]);
259255
kfree(work->shared);

0 commit comments

Comments
 (0)