aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3087-drm-amdgpu-add-HDP-asic-callbacks-for-VI.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3087-drm-amdgpu-add-HDP-asic-callbacks-for-VI.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3087-drm-amdgpu-add-HDP-asic-callbacks-for-VI.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3087-drm-amdgpu-add-HDP-asic-callbacks-for-VI.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3087-drm-amdgpu-add-HDP-asic-callbacks-for-VI.patch
new file mode 100644
index 00000000..ec9c37a6
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3087-drm-amdgpu-add-HDP-asic-callbacks-for-VI.patch
@@ -0,0 +1,52 @@
+From 8a1687ba5b26dda01b4a41eba713472f0a4e9836 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Wed, 6 Sep 2017 18:06:24 -0400
+Subject: [PATCH 3087/4131] drm/amdgpu: add HDP asic callbacks for VI
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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>
+---
+ drivers/gpu/drm/amd/amdgpu/vi.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
+index 729f7e5..58572e7 100644
+--- a/drivers/gpu/drm/amd/amdgpu/vi.c
++++ b/drivers/gpu/drm/amd/amdgpu/vi.c
+@@ -899,6 +899,18 @@ static uint32_t vi_get_rev_id(struct amdgpu_device *adev)
+ >> PCIE_EFUSE4__STRAP_BIF_ATI_REV_ID__SHIFT;
+ }
+
++static void vi_flush_hdp(struct amdgpu_device *adev)
++{
++ WREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL, 1);
++ RREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL);
++}
++
++static void vi_invalidate_hdp(struct amdgpu_device *adev)
++{
++ WREG32(mmHDP_DEBUG0, 1);
++ RREG32(mmHDP_DEBUG0);
++}
++
+ static const struct amdgpu_asic_funcs vi_asic_funcs =
+ {
+ .read_disabled_bios = &vi_read_disabled_bios,
+@@ -910,6 +922,8 @@ static const struct amdgpu_asic_funcs vi_asic_funcs =
+ .set_uvd_clocks = &vi_set_uvd_clocks,
+ .set_vce_clocks = &vi_set_vce_clocks,
+ .get_config_memsize = &vi_get_config_memsize,
++ .flush_hdp = &vi_flush_hdp,
++ .invalidate_hdp = &vi_invalidate_hdp,
+ };
+
+ #define CZ_REV_BRISTOL(rev) \
+--
+2.7.4
+