AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/2] Store SDMA ring instance and index in the ring
@ 2026-06-22 14:36 Tvrtko Ursulin
  2026-06-22 14:36 ` [RFC 1/2] drm/amdgpu: Store SDMA " Tvrtko Ursulin
  2026-06-22 14:36 ` [RFC 2/2] drm/amdgpu: Drop null SDMA instance checks from SDMA vfuncs Tvrtko Ursulin
  0 siblings, 2 replies; 7+ messages in thread
From: Tvrtko Ursulin @ 2026-06-22 14:36 UTC (permalink / raw)
  To: amd-gfx; +Cc: kernel-dev, Tvrtko Ursulin, Alex Deucher

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 <alexander.deucher@amd.com>

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-09-08  9:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 14:36 [RFC 0/2] Store SDMA ring instance and index in the ring Tvrtko Ursulin
2026-06-22 14:36 ` [RFC 1/2] drm/amdgpu: Store SDMA " Tvrtko Ursulin
2026-09-08  8:42   ` Timur Kristóf
2026-09-08  8:54     ` Tvrtko Ursulin
2026-09-08  9:32       ` Timur Kristóf
2026-06-22 14:36 ` [RFC 2/2] drm/amdgpu: Drop null SDMA instance checks from SDMA vfuncs Tvrtko Ursulin
2026-09-08  8:42   ` Timur Kristóf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox