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

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>

+18
+18
drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c
··· 475 475 return (nak_r + nak_g); 476 476 } 477 477 478 + #define MMIO_REG_HOLE_OFFSET 0x1A000 479 + 480 + static void nbio_v7_9_set_reg_remap(struct amdgpu_device *adev) 481 + { 482 + if (!amdgpu_sriov_vf(adev) && (PAGE_SIZE <= 4096)) { 483 + adev->rmmio_remap.reg_offset = MMIO_REG_HOLE_OFFSET; 484 + adev->rmmio_remap.bus_addr = adev->rmmio_base + MMIO_REG_HOLE_OFFSET; 485 + } else { 486 + adev->rmmio_remap.reg_offset = 487 + SOC15_REG_OFFSET( 488 + NBIO, 0, 489 + regBIF_BX_DEV0_EPF0_VF0_HDP_MEM_COHERENCY_FLUSH_CNTL) 490 + << 2; 491 + adev->rmmio_remap.bus_addr = 0; 492 + } 493 + } 494 + 478 495 const struct amdgpu_nbio_funcs nbio_v7_9_funcs = { 479 496 .get_hdp_flush_req_offset = nbio_v7_9_get_hdp_flush_req_offset, 480 497 .get_hdp_flush_done_offset = nbio_v7_9_get_hdp_flush_done_offset, ··· 516 499 .get_memory_partition_mode = nbio_v7_9_get_memory_partition_mode, 517 500 .init_registers = nbio_v7_9_init_registers, 518 501 .get_pcie_replay_count = nbio_v7_9_get_pcie_replay_count, 502 + .set_reg_remap = nbio_v7_9_set_reg_remap, 519 503 }; 520 504 521 505 static void nbio_v7_9_query_ras_error_count(struct amdgpu_device *adev,