[AMD Official Use Only]
Acked-by: Alex Deucher <alexander.deucher@xxxxxxx>
From: Christian König <ckoenig.leichtzumerken@xxxxxxxxx>
Sent: Tuesday, November 16, 2021 5:43 AM To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx> Subject: Re: [PATCH 2/6] drm/amdgpu: stop getting excl fence separately Adding Alex.
Once more a ping to the mailing list. Thanks, Christian. Am 11.11.21 um 09:58 schrieb Christian König: > Just a ping to the amd-gfx list. > > Trivial cleanup, can anybody give me an rb for that? > > Thanks, > Christian. > > Am 28.10.21 um 15:26 schrieb Christian König: >> Just grab all fences for the display flip in one go. >> >> Signed-off-by: Christian König <christian.koenig@xxxxxxx> >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - >> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 +----- >> 2 files changed, 1 insertion(+), 6 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h >> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h >> index d58e37fd01f4..4da7eb65e744 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h >> @@ -457,7 +457,6 @@ struct amdgpu_flip_work { >> uint64_t base; >> struct drm_pending_vblank_event *event; >> struct amdgpu_bo *old_abo; >> - struct dma_fence *excl; >> unsigned shared_count; >> struct dma_fence **shared; >> struct dma_fence_cb cb; >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> index dc50c05f23fc..68108f151dad 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c >> @@ -83,9 +83,6 @@ static void amdgpu_display_flip_work_func(struct >> work_struct *__work) >> unsigned i; >> int vpos, hpos; >> - if (amdgpu_display_flip_handle_fence(work, &work->excl)) >> - return; >> - >> for (i = 0; i < work->shared_count; ++i) >> if (amdgpu_display_flip_handle_fence(work, &work->shared[i])) >> return; >> @@ -203,7 +200,7 @@ int amdgpu_display_crtc_page_flip_target(struct >> drm_crtc *crtc, >> goto unpin; >> } >> - r = dma_resv_get_fences(new_abo->tbo.base.resv, &work->excl, >> + r = dma_resv_get_fences(new_abo->tbo.base.resv, NULL, >> &work->shared_count, &work->shared); >> if (unlikely(r != 0)) { >> DRM_ERROR("failed to get fences for buffer\n"); >> @@ -253,7 +250,6 @@ int amdgpu_display_crtc_page_flip_target(struct >> drm_crtc *crtc, >> cleanup: >> amdgpu_bo_unref(&work->old_abo); >> - dma_fence_put(work->excl); >> for (i = 0; i < work->shared_count; ++i) >> dma_fence_put(work->shared[i]); >> kfree(work->shared); > |