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

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>

+16
+16
drivers/gpu/drm/amd/amdgpu/nbio_v7_2.c
··· 408 408 regBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL) << 2; 409 409 } 410 410 411 + #define MMIO_REG_HOLE_OFFSET (0x80000 - PAGE_SIZE) 412 + 413 + static void nbio_v7_2_set_reg_remap(struct amdgpu_device *adev) 414 + { 415 + if (!amdgpu_sriov_vf(adev) && (PAGE_SIZE <= 4096)) { 416 + adev->rmmio_remap.reg_offset = MMIO_REG_HOLE_OFFSET; 417 + adev->rmmio_remap.bus_addr = adev->rmmio_base + MMIO_REG_HOLE_OFFSET; 418 + } else { 419 + adev->rmmio_remap.reg_offset = 420 + SOC15_REG_OFFSET(NBIO, 0, 421 + regBIF_BX_PF0_HDP_MEM_COHERENCY_FLUSH_CNTL) << 2; 422 + adev->rmmio_remap.bus_addr = 0; 423 + } 424 + } 425 + 411 426 const struct amdgpu_nbio_funcs nbio_v7_2_funcs = { 412 427 .get_hdp_flush_req_offset = nbio_v7_2_get_hdp_flush_req_offset, 413 428 .get_hdp_flush_done_offset = nbio_v7_2_get_hdp_flush_done_offset, ··· 444 429 .ih_control = nbio_v7_2_ih_control, 445 430 .init_registers = nbio_v7_2_init_registers, 446 431 .remap_hdp_registers = nbio_v7_2_remap_hdp_registers, 432 + .set_reg_remap = nbio_v7_2_set_reg_remap, 447 433 };