aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1288-drm-amd-powerplay-fix-the-confusing-ppfeature-mask-c.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1288-drm-amd-powerplay-fix-the-confusing-ppfeature-mask-c.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1288-drm-amd-powerplay-fix-the-confusing-ppfeature-mask-c.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1288-drm-amd-powerplay-fix-the-confusing-ppfeature-mask-c.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1288-drm-amd-powerplay-fix-the-confusing-ppfeature-mask-c.patch
new file mode 100644
index 00000000..89ba6892
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/1288-drm-amd-powerplay-fix-the-confusing-ppfeature-mask-c.patch
@@ -0,0 +1,68 @@
+From 586ffbaee81d0622bf414305a152e40ce8fbdba4 Mon Sep 17 00:00:00 2001
+From: Evan Quan <evan.quan@amd.com>
+Date: Tue, 19 Feb 2019 12:20:54 +0800
+Subject: [PATCH 1288/2940] drm/amd/powerplay: fix the confusing ppfeature mask
+ calculations
+
+Simplify the ppfeature mask calculations.
+
+Change-Id: I41dee48c2ac8ed1fd7736bc8bb1f832da22cba13
+Signed-off-by: Evan Quan <evan.quan@amd.com>
+Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 ++--
+ drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 ++--
+ drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+index ed67b6a0fbb2..5a167d19c028 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+@@ -4407,9 +4407,9 @@ static int vega10_set_ppfeature_status(struct pp_hwmgr *hwmgr, uint64_t new_ppfe
+ return ret;
+
+ features_to_disable =
+- (features_enabled ^ new_ppfeature_masks) & features_enabled;
++ features_enabled & ~new_ppfeature_masks;
+ features_to_enable =
+- (features_enabled ^ new_ppfeature_masks) ^ features_to_disable;
++ ~features_enabled & new_ppfeature_masks;
+
+ pr_debug("features_to_disable 0x%llx\n", features_to_disable);
+ pr_debug("features_to_enable 0x%llx\n", features_to_enable);
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
+index 6c8e78611c03..bdb48e94eff6 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
+@@ -2009,9 +2009,9 @@ static int vega12_set_ppfeature_status(struct pp_hwmgr *hwmgr, uint64_t new_ppfe
+ return ret;
+
+ features_to_disable =
+- (features_enabled ^ new_ppfeature_masks) & features_enabled;
++ features_enabled & ~new_ppfeature_masks;
+ features_to_enable =
+- (features_enabled ^ new_ppfeature_masks) ^ features_to_disable;
++ ~features_enabled & new_ppfeature_masks;
+
+ pr_debug("features_to_disable 0x%llx\n", features_to_disable);
+ pr_debug("features_to_enable 0x%llx\n", features_to_enable);
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
+index c95e0f35ed7f..fae95d9ebd7a 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
+@@ -3084,9 +3084,9 @@ static int vega20_set_ppfeature_status(struct pp_hwmgr *hwmgr, uint64_t new_ppfe
+ return ret;
+
+ features_to_disable =
+- (features_enabled ^ new_ppfeature_masks) & features_enabled;
++ features_enabled & ~new_ppfeature_masks;
+ features_to_enable =
+- (features_enabled ^ new_ppfeature_masks) ^ features_to_disable;
++ ~features_enabled & new_ppfeature_masks;
+
+ pr_debug("features_to_disable 0x%llx\n", features_to_disable);
+ pr_debug("features_to_enable 0x%llx\n", features_to_enable);
+--
+2.17.1
+