Skip to content

drm/amdgpu: add gfx eviction fence helpers

This patch adds basic eviction fence framework for the gfx buffers. The idea is to:

  • One eviction fence is created per gfx process, at kms_open.
  • This fence is attached to all the gem buffers created by this process.
  • This fence is detached to all the gem buffers at postclose_kms.

This framework will be further used for usermode queues.

V2: Addressed review comments from Christian - keep fence_ctx and fence_seq directly in fpriv - evcition_fence should be dynamically allocated - do not save eviction fence instance in BO, there could be many such fences attached to one BO - use dma_resv_replace_fence() in detach

V3: Addressed review comments from Christian - eviction fence create and destroy functions should be called only once from fpriv create/destroy - use dma_fence_put() in eviction_fence_destroy

V4: Addressed review comments from Christian: - create a separate ev_fence_mgr structure - cleanup fence init part - do not add a domain for fence owner KGD

Cc: Christian Koenig christian.koenig@amd.com Cc: Alex Deucher alexander.deucher@amd.com Signed-off-by: Shashank Sharma shashank.sharma@amd.com Signed-off-by: Arvind Yadav arvind.yadav@amd.com

Merge request reports

Loading