On 2026. szeptember 8., kedd 10:54:04 közép-európai nyári idő Tvrtko Ursulin wrote: > On 08/09/2026 09:42, Timur Kristóf wrote: > > On 2026. június 22., hétfő 16:36:48 közép-európai nyári idő Tvrtko Ursulin > > > > wrote: > >> Instead of searching for the matching SDMA instance inside many of the > >> SDMA ring vfuncs, lets just cache the instance and index in the new SDMA > >> specific section of struct amdgpu_ring. This converts a function call > >> plus > >> array walks to a direct lookup. > > > > AFAIK, the rings already have the IP block instance ID in the "me" field. > > So this could be simplified by using that. For example like this: > > https://pastebin.com/raw/jp4Uk2sE > > Ah thank you, it never occurred to me ring->me is not a management > engine of some sort but ring's personal pronoun. :)
I think the field should be better documented. AFAIU, it refers to the firmware instance that handles the ring. For SDMA it's the same as the instance ID. (For graphics/compute this is the "micro engine" CP (command processor) instance. There is only one graphics/compute IP block and there are several CP instance within that same IP block.) In your words, "on a rainy day" we can write that documentation or just rename the field to something more meaningful. :) > >> While at it, we also consolidate the initialization side with a new > >> amdgpu_sdma_ring_init() helper. > > > > Can you move that part to a separate commit? > > Yes that makes much more sense indeed, will do. Thanks!
