aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2017-09-06 18:06:24 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-02-19 14:17:13 -0500
commitdd8d07f2fb2a5acb972e62a5cd00f6d56e7d2b8c (patch)
treed3266aa57ba4fefa8ab45407944a497987448bda /drivers/gpu/drm/amd/amdgpu
parent13854c60d7753cbb2bb1db6463df220164ec001a (diff)
drm/amdgpu: add HDP asic callbacks for VI
Needed to flush and invalidate the HDP block using the CPU. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Samuel Li <Samuel.Li@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vi.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 1e3e05a11f7a..fbb77b959f8a 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -856,6 +856,18 @@ static uint32_t vi_get_rev_id(struct amdgpu_device *adev)
856 >> PCIE_EFUSE4__STRAP_BIF_ATI_REV_ID__SHIFT; 856 >> PCIE_EFUSE4__STRAP_BIF_ATI_REV_ID__SHIFT;
857} 857}
858 858
859static void vi_flush_hdp(struct amdgpu_device *adev)
860{
861 WREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL, 1);
862 RREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL);
863}
864
865static void vi_invalidate_hdp(struct amdgpu_device *adev)
866{
867 WREG32(mmHDP_DEBUG0, 1);
868 RREG32(mmHDP_DEBUG0);
869}
870
859static const struct amdgpu_asic_funcs vi_asic_funcs = 871static const struct amdgpu_asic_funcs vi_asic_funcs =
860{ 872{
861 .read_disabled_bios = &vi_read_disabled_bios, 873 .read_disabled_bios = &vi_read_disabled_bios,
@@ -867,6 +879,8 @@ static const struct amdgpu_asic_funcs vi_asic_funcs =
867 .set_uvd_clocks = &vi_set_uvd_clocks, 879 .set_uvd_clocks = &vi_set_uvd_clocks,
868 .set_vce_clocks = &vi_set_vce_clocks, 880 .set_vce_clocks = &vi_set_vce_clocks,
869 .get_config_memsize = &vi_get_config_memsize, 881 .get_config_memsize = &vi_get_config_memsize,
882 .flush_hdp = &vi_flush_hdp,
883 .invalidate_hdp = &vi_invalidate_hdp,
870}; 884};
871 885
872#define CZ_REV_BRISTOL(rev) \ 886#define CZ_REV_BRISTOL(rev) \