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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: add set_reg_remap callback for NBIO 7.0

This will be used to consolidate the register remap offset
configuration and fix HDP flushes on systems non-4K pages.

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

+15
+15
drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c
··· 278 278 SOC15_REG_OFFSET(NBIO, 0, mmHDP_MEM_COHERENCY_FLUSH_CNTL) << 2; 279 279 } 280 280 281 + #define MMIO_REG_HOLE_OFFSET (0x80000 - PAGE_SIZE) 282 + 283 + static void nbio_v7_0_set_reg_remap(struct amdgpu_device *adev) 284 + { 285 + if (!amdgpu_sriov_vf(adev) && (PAGE_SIZE <= 4096)) { 286 + adev->rmmio_remap.reg_offset = MMIO_REG_HOLE_OFFSET; 287 + adev->rmmio_remap.bus_addr = adev->rmmio_base + MMIO_REG_HOLE_OFFSET; 288 + } else { 289 + adev->rmmio_remap.reg_offset = 290 + SOC15_REG_OFFSET(NBIO, 0, mmHDP_MEM_COHERENCY_FLUSH_CNTL) << 2; 291 + adev->rmmio_remap.bus_addr = 0; 292 + } 293 + } 294 + 281 295 const struct amdgpu_nbio_funcs nbio_v7_0_funcs = { 282 296 .get_hdp_flush_req_offset = nbio_v7_0_get_hdp_flush_req_offset, 283 297 .get_hdp_flush_done_offset = nbio_v7_0_get_hdp_flush_done_offset, ··· 311 297 .ih_control = nbio_v7_0_ih_control, 312 298 .init_registers = nbio_v7_0_init_registers, 313 299 .remap_hdp_registers = nbio_v7_0_remap_hdp_registers, 300 + .set_reg_remap = nbio_v7_0_set_reg_remap, 314 301 };