drm/amdgpu: Fix the mmio remap failure issue
Subsystems (2)
PATCH 1/1 drm/amdgpu: Fix the mmio remap failure issue
Initialize the rmmio_remap to fix the mmio remap issue when start the kfdtest. The error message is as follows.
"Failed to map remapped mmio page on gpu_mem 0"
Signed-off-by Ma Jun <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vi.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/vi.c +6 -0
@@ -1458,8 +1458,14 @@ static const struct amdgpu_asic_funcs vi_asic_funcs =static int vi_common_early_init (void *handle) { +#define MMIO_REG_HOLE_OFFSET (0x80000 - PAGE_SIZE)struct amdgpu_device *adev = (struct amdgpu_device *)handle; +if (!amdgpu_sriov_vf (adev)) { + adev->rmmio_remap.reg_offset =MMIO_REG_HOLE_OFFSET ; + adev->rmmio_remap.bus_addr = adev->rmmio_base +MMIO_REG_HOLE_OFFSET ; + } +if (adev->flags &AMD_IS_APU ) { adev->smc_rreg = &cz_smc_rreg; adev->smc_wreg = &cz_smc_wreg;
Signature · 1 line
2.34.1