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.11

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_11.c
··· 352 352 *flags |= AMD_CG_SUPPORT_BIF_LS; 353 353 } 354 354 355 + #define MMIO_REG_HOLE_OFFSET (0x80000 - PAGE_SIZE) 356 + 357 + static void nbio_v7_11_set_reg_remap(struct amdgpu_device *adev) 358 + { 359 + if (!amdgpu_sriov_vf(adev) && (PAGE_SIZE <= 4096)) { 360 + adev->rmmio_remap.reg_offset = MMIO_REG_HOLE_OFFSET; 361 + adev->rmmio_remap.bus_addr = adev->rmmio_base + MMIO_REG_HOLE_OFFSET; 362 + } else { 363 + adev->rmmio_remap.reg_offset = 364 + SOC15_REG_OFFSET(NBIO, 0, regBIF_BX_PF1_HDP_MEM_COHERENCY_FLUSH_CNTL) << 2; 365 + adev->rmmio_remap.bus_addr = 0; 366 + } 367 + } 368 + 355 369 const struct amdgpu_nbio_funcs nbio_v7_11_funcs = { 356 370 .get_hdp_flush_req_offset = nbio_v7_11_get_hdp_flush_req_offset, 357 371 .get_hdp_flush_done_offset = nbio_v7_11_get_hdp_flush_done_offset, ··· 388 374 .ih_control = nbio_v7_11_ih_control, 389 375 .init_registers = nbio_v7_11_init_registers, 390 376 .remap_hdp_registers = nbio_v7_11_remap_hdp_registers, 377 + .set_reg_remap = nbio_v7_11_set_reg_remap, 391 378 };