summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2023-09-11 17:38:57 -0400
committerAlex Deucher <alexander.deucher@amd.com>2023-09-12 17:30:22 -0400
commitaddd7aef251cca374cef743824cc5ae230370bd0 (patch)
tree7745243dee59aad206b23c886f2f6fe207313a9d /drivers
parentb85a17d35415d8a94db5c58f008a2ae11d4702bd (diff)
drm/amdgpu: add remap_hdp_registers callback for nbio 7.11
Implement support for remapping the HDP aperture registers for NBIO 7.11. Reviewed-by: Lang Yu <lang.yu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
index bcf5fb420fda..6873eead1e19 100644
--- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
+++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
@@ -28,6 +28,14 @@
#include "nbio/nbio_7_11_0_sh_mask.h"
#include <uapi/linux/kfd_ioctl.h>
+static void nbio_v7_11_remap_hdp_registers(struct amdgpu_device *adev)
+{
+ WREG32_SOC15(NBIO, 0, regBIF_BX0_REMAP_HDP_MEM_FLUSH_CNTL,
+ adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL);
+ WREG32_SOC15(NBIO, 0, regBIF_BX0_REMAP_HDP_REG_FLUSH_CNTL,
+ adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_REG_FLUSH_CNTL);
+}
+
static u32 nbio_v7_11_get_rev_id(struct amdgpu_device *adev)
{
u32 tmp;
@@ -284,4 +292,5 @@ const struct amdgpu_nbio_funcs nbio_v7_11_funcs = {
.ih_doorbell_range = nbio_v7_11_ih_doorbell_range,
.ih_control = nbio_v7_11_ih_control,
.init_registers = nbio_v7_11_init_registers,
+ .remap_hdp_registers = nbio_v7_11_remap_hdp_registers,
};