summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
diff options
context:
space:
mode:
authorLikun Gao <Likun.Gao@amd.com>2020-12-28 16:42:40 +0800
committerAlex Deucher <alexander.deucher@amd.com>2021-01-05 11:32:48 -0500
commit3c556139481c5fb755fb8316e9a07307dc82c711 (patch)
tree5fc672bab4d11b49db336f03133dd99f07789d61 /drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
parentb291a3872b5a8f105025c22a956c853779ad2326 (diff)
downloadlinux-stable-3c556139481c5fb755fb8316e9a07307dc82c711.tar.gz
linux-stable-3c556139481c5fb755fb8316e9a07307dc82c711.tar.bz2
linux-stable-3c556139481c5fb755fb8316e9a07307dc82c711.zip
drm/amdgpu: add hdp version 4 functions
Unify hdp related function into hdp structure for hdp version 4. V2: Add function to remap hdp registers for nbio version 6.1 Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c b/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
index d2f1fe55d388..7fc5043de494 100644
--- a/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c
@@ -29,6 +29,15 @@
#include "nbio/nbio_6_1_sh_mask.h"
#include "nbio/nbio_6_1_smn.h"
#include "vega10_enum.h"
+#include <uapi/linux/kfd_ioctl.h>
+
+static void nbio_v6_1_remap_hdp_registers(struct amdgpu_device *adev)
+{
+ WREG32_SOC15(NBIO, 0, mmREMAP_HDP_MEM_FLUSH_CNTL,
+ adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL);
+ WREG32_SOC15(NBIO, 0, mmREMAP_HDP_REG_FLUSH_CNTL,
+ adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_REG_FLUSH_CNTL);
+}
static u32 nbio_v6_1_get_rev_id(struct amdgpu_device *adev)
{
@@ -277,4 +286,5 @@ const struct amdgpu_nbio_funcs nbio_v6_1_funcs = {
.get_clockgating_state = nbio_v6_1_get_clockgating_state,
.ih_control = nbio_v6_1_ih_control,
.init_registers = nbio_v6_1_init_registers,
+ .remap_hdp_registers = nbio_v6_1_remap_hdp_registers,
};