drm/amdgpu: Use the correct API to read register
authorLijo Lazar <lijo.lazar@amd.com>
Wed, 12 Jan 2022 14:12:56 +0000 (19:42 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:40:43 +0000 (09:40 -0400)
Use SOC15 API so that the register offset is calculated correctly.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

index 2676a18..ad3e8ce 100644 (file)
@@ -1637,7 +1637,7 @@ static int gfx_v9_4_3_mqd_init(struct amdgpu_ring *ring)
 
        /* set static priority for a queue/ring */
        gfx_v9_4_3_mqd_set_priority(ring, mqd);
-       mqd->cp_hqd_quantum = RREG32(regCP_HQD_QUANTUM);
+       mqd->cp_hqd_quantum = RREG32_SOC15(GC, 0, regCP_HQD_QUANTUM);
 
        /* map_queues packet doesn't need activate the queue,
         * so only kiq need set this field.