aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4070-drm-amdgpu-powerplay-fix-smu7_get_memory_type-for-fi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4070-drm-amdgpu-powerplay-fix-smu7_get_memory_type-for-fi.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4070-drm-amdgpu-powerplay-fix-smu7_get_memory_type-for-fi.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4070-drm-amdgpu-powerplay-fix-smu7_get_memory_type-for-fi.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4070-drm-amdgpu-powerplay-fix-smu7_get_memory_type-for-fi.patch
new file mode 100644
index 00000000..93d3fd59
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4070-drm-amdgpu-powerplay-fix-smu7_get_memory_type-for-fi.patch
@@ -0,0 +1,39 @@
+From 4622b857b9fde11cd6e419ac64d52fe651935aa5 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Wed, 11 Apr 2018 17:57:13 -0500
+Subject: [PATCH 4070/4131] drm/amdgpu/powerplay: fix smu7_get_memory_type for
+ fiji
+
+Fiji uses a different register than other smu7 asics, but
+we already have this info in the base driver so just
+use that.
+
+Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+index 73fff2a..15d127e 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+@@ -4121,13 +4121,9 @@ static int smu7_read_clock_registers(struct pp_hwmgr *hwmgr)
+ static int smu7_get_memory_type(struct pp_hwmgr *hwmgr)
+ {
+ struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
+- uint32_t temp;
+-
+- temp = cgs_read_register(hwmgr->device, mmMC_SEQ_MISC0);
++ struct amdgpu_device *adev = hwmgr->adev;
+
+- data->is_memory_gddr5 = (MC_SEQ_MISC0_GDDR5_VALUE ==
+- ((temp & MC_SEQ_MISC0_GDDR5_MASK) >>
+- MC_SEQ_MISC0_GDDR5_SHIFT));
++ data->is_memory_gddr5 = (adev->gmc.vram_type == AMDGPU_VRAM_TYPE_GDDR5);
+
+ return 0;
+ }
+--
+2.7.4
+