Skip to content

Commit

Permalink
drm/amdgpu: SRIOV violation fixes
Browse files Browse the repository at this point in the history
Fix to use indirect register access method

Signed-off-by: Victor Skvortsov <victor.skvortsov@amd.com>
(cherry picked from commit 67618319502f2eb8df87bd7a6a34c84fcc1a53a6)

Change-Id: I758e15ead98803f82a2ede6c5993e58270ee927a
  • Loading branch information
Victor Skvortsov authored and Gerrit Cr committed Feb 10, 2022
1 parent c0db7d5 commit 527eb02
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
Original file line number Diff line number Diff line change
@@ -358,11 +358,11 @@ int kgd_gfx_v9_hqd_dump(struct amdgpu_device *adev,
{
uint32_t i = 0, reg;
#define HQD_N_REGS 56
#define DUMP_REG(addr) do { \
if (WARN_ON_ONCE(i >= HQD_N_REGS)) \
break; \
(*dump)[i][0] = (addr) << 2; \
(*dump)[i++][1] = RREG32(addr); \
#define DUMP_REG(addr) do { \
if (WARN_ON_ONCE(i >= HQD_N_REGS)) \
break; \
(*dump)[i][0] = (addr) << 2; \
(*dump)[i++][1] = RREG32_SOC15_IP(GC, addr); \
} while (0)

*dump = kmalloc_array(HQD_N_REGS * 2, sizeof(uint32_t), GFP_KERNEL);
@@ -1077,7 +1077,7 @@ void kgd_gfx_v9_get_iq_wait_times(struct amdgpu_device *adev,
uint32_t *wait_times)

{
*wait_times = RREG32(SOC15_REG_OFFSET(GC, 0, mmCP_IQ_WAIT_TIME2));
*wait_times = RREG32_SOC15(GC, 0, mmCP_IQ_WAIT_TIME2);
}

void kgd_gfx_v9_set_vm_context_page_table_base(struct amdgpu_device *adev,

0 comments on commit 527eb02

Please sign in to comment.