aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0142-drm-amd-powerplay-precedence-bug-in-init_non_clock_f.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0142-drm-amd-powerplay-precedence-bug-in-init_non_clock_f.patch')
-rw-r--r--common/recipes-kernel/linux/files/0142-drm-amd-powerplay-precedence-bug-in-init_non_clock_f.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0142-drm-amd-powerplay-precedence-bug-in-init_non_clock_f.patch b/common/recipes-kernel/linux/files/0142-drm-amd-powerplay-precedence-bug-in-init_non_clock_f.patch
new file mode 100644
index 00000000..460cba32
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0142-drm-amd-powerplay-precedence-bug-in-init_non_clock_f.patch
@@ -0,0 +1,34 @@
+From 6a20fdd606d7401aa6c7740af0927d56f15680ff Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Mon, 4 Jan 2016 23:44:24 +0300
+Subject: [PATCH 0142/1110] drm/amd/powerplay: precedence bug in
+ init_non_clock_fields()
+
+The cast to uint8_t happens before the right shift so this always sets
+.m3arb to zero. The cast is actually a no-op so we can remove it.
+
+Fixes: 3bace3591493 ('drm/amd/powerplay: add hardware manager sub-component')
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
+index 1d385f4..8f9d705 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c
+@@ -735,8 +735,8 @@ static int init_non_clock_fields(struct pp_hwmgr *hwmgr,
+
+ ps->memory.dllOff = (0 != tmp);
+
+- ps->memory.m3arb = (uint8_t)(le32_to_cpu(pnon_clock_info->ulCapsAndSettings) &
+- ATOM_PPLIB_M3ARB_MASK) >> ATOM_PPLIB_M3ARB_SHIFT;
++ ps->memory.m3arb = (le32_to_cpu(pnon_clock_info->ulCapsAndSettings) &
++ ATOM_PPLIB_M3ARB_MASK) >> ATOM_PPLIB_M3ARB_SHIFT;
+
+ ps->temperatures.min = PP_TEMPERATURE_UNITS_PER_CENTIGRADES *
+ pnon_clock_info->ucMinTemperature;
+--
+2.7.4
+