Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu/soc21: use common nbio callback to set remap offset

This fixes HDP flushes on systems with non-4K pages.

Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+1 -6
-3
drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c
··· 345 345 data &= ~RCC_DEV0_EPF2_STRAP2__STRAP_NO_SOFT_RESET_DEV0_F2_MASK; 346 346 WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF2_STRAP2, data); 347 347 } 348 - if (amdgpu_sriov_vf(adev)) 349 - adev->rmmio_remap.reg_offset = SOC15_REG_OFFSET(NBIO, 0, 350 - regBIF_BX_DEV0_EPF0_VF0_HDP_MEM_COHERENCY_FLUSH_CNTL) << 2; 351 348 } 352 349 353 350 static u32 nbio_v4_3_get_rom_offset(struct amdgpu_device *adev)
+1 -3
drivers/gpu/drm/amd/amdgpu/soc21.c
··· 557 557 558 558 static int soc21_common_early_init(void *handle) 559 559 { 560 - #define MMIO_REG_HOLE_OFFSET (0x80000 - PAGE_SIZE) 561 560 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 562 561 563 - adev->rmmio_remap.reg_offset = MMIO_REG_HOLE_OFFSET; 564 - adev->rmmio_remap.bus_addr = adev->rmmio_base + MMIO_REG_HOLE_OFFSET; 562 + adev->nbio.funcs->set_reg_remap(adev); 565 563 adev->smc_rreg = NULL; 566 564 adev->smc_wreg = NULL; 567 565 adev->pcie_rreg = &amdgpu_device_indirect_rreg;