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

drm/amdgpu: add HDP remap functionality to nbio 7.7

Was missing before and would have resulted in a write to
a non-existant register. Normally APUs don't use HDP, but
other asics could use this code and APUs do use the HDP
when used in passthrough.

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+9
+9
drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c
··· 28 28 #include "nbio/nbio_7_7_0_sh_mask.h" 29 29 #include <uapi/linux/kfd_ioctl.h> 30 30 31 + static void nbio_v7_7_remap_hdp_registers(struct amdgpu_device *adev) 32 + { 33 + WREG32_SOC15(NBIO, 0, regBIF_BX0_REMAP_HDP_MEM_FLUSH_CNTL, 34 + adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL); 35 + WREG32_SOC15(NBIO, 0, regBIF_BX0_REMAP_HDP_REG_FLUSH_CNTL, 36 + adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_REG_FLUSH_CNTL); 37 + } 38 + 31 39 static u32 nbio_v7_7_get_rev_id(struct amdgpu_device *adev) 32 40 { 33 41 u32 tmp; ··· 344 336 .get_clockgating_state = nbio_v7_7_get_clockgating_state, 345 337 .ih_control = nbio_v7_7_ih_control, 346 338 .init_registers = nbio_v7_7_init_registers, 339 + .remap_hdp_registers = nbio_v7_7_remap_hdp_registers, 347 340 };