I am not sure TBH if any workloads end up calling these often enough to matter,
but ages ago I noticed SDMA rings doing runtime lookup of "what instance am I"
by repeatedly searching the device array, and thought to float it to see if
there are any comments. At least the init path consolidation could be worth it,
although that too is not perfect.

Cc: Alex Deucher <[email protected]>

Tvrtko Ursulin (2):
  drm/amdgpu: Store SDMA instance and index in the ring
  drm/amdgpu: Drop null SDMA instance checks from SDMA vfuncs

 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h |  6 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 51 +++++++++---------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h |  6 +--
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c    |  4 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c   | 17 ++++----
 drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c   | 17 ++++----
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c   | 23 ++++-------
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 29 ++++++--------
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c   | 21 ++++------
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c   | 22 +++++-----
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c   | 24 +++++------
 drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c   | 23 +++++------
 drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c   | 29 ++++++--------
 13 files changed, 112 insertions(+), 160 deletions(-)

-- 
2.54.0

Reply via email to