Skip to content

Commit caade9d

Browse files
Jie1zhangalexdeucher
authored andcommitted
drm/amdgpu: Use logical instance ID for SDMA v4_4_2 queue operations
Simplify SDMA v4_4_2 queue reset and stop operations by: 1. Removing GET_INST(SDMA0) conversion for ring->me 2. Using the logical instance ID (ring->me) directly 3. Maintaining consistent behavior with other SDMA queue operations This change aligns with the existing queue handling logic where ring->me already represents the correct instance identifier. Signed-off-by: Lijo Lazar <[email protected]> Signed-off-by: Jesse Zhang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 3bab282) Cc: [email protected]
1 parent 09b5855 commit caade9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,7 @@ static bool sdma_v4_4_2_page_ring_is_guilty(struct amdgpu_ring *ring)
16701670
static int sdma_v4_4_2_reset_queue(struct amdgpu_ring *ring, unsigned int vmid)
16711671
{
16721672
struct amdgpu_device *adev = ring->adev;
1673-
u32 id = GET_INST(SDMA0, ring->me);
1673+
u32 id = ring->me;
16741674
int r;
16751675

16761676
if (!(adev->sdma.supported_reset & AMDGPU_RESET_TYPE_PER_QUEUE))
@@ -1686,7 +1686,7 @@ static int sdma_v4_4_2_reset_queue(struct amdgpu_ring *ring, unsigned int vmid)
16861686
static int sdma_v4_4_2_stop_queue(struct amdgpu_ring *ring)
16871687
{
16881688
struct amdgpu_device *adev = ring->adev;
1689-
u32 instance_id = GET_INST(SDMA0, ring->me);
1689+
u32 instance_id = ring->me;
16901690
u32 inst_mask;
16911691
uint64_t rptr;
16921692

0 commit comments

Comments
 (0)