[PATCH] drm/amd/powerplay: always refetch the enabled features status on dpm enablement

Deucher, Alexander Alexander.Deucher at amd.com
Tue Feb 11 14:17:17 UTC 2020


[AMD Public Use]

Acked-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Evan Quan <evan.quan at amd.com>
Sent: Tuesday, February 11, 2020 12:41 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Quan, Evan <Evan.Quan at amd.com>
Subject: [PATCH] drm/amd/powerplay: always refetch the enabled features status on dpm enablement

Otherwise, the cached dpm features status may be inconsistent under some
case(e.g. baco reset of Navi asic).

Change-Id: Ia7d7089e82cbe4ccaa9fadce1f2f0043c42c73df
Signed-off-by: Evan Quan <evan.quan at amd.com>
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
index 0dc49479a7eb..b06c057a9002 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
@@ -898,6 +898,9 @@ int smu_v11_0_system_features_control(struct smu_context *smu,
         if (ret)
                 return ret;

+       bitmap_zero(feature->enabled, feature->feature_num);
+       bitmap_zero(feature->supported, feature->feature_num);
+
         if (en) {
                 ret = smu_feature_get_enabled_mask(smu, feature_mask, 2);
                 if (ret)
@@ -907,9 +910,6 @@ int smu_v11_0_system_features_control(struct smu_context *smu,
                             feature->feature_num);
                 bitmap_copy(feature->supported, (unsigned long *)&feature_mask,
                             feature->feature_num);
-       } else {
-               bitmap_zero(feature->enabled, feature->feature_num);
-               bitmap_zero(feature->supported, feature->feature_num);
         }

         return ret;
--
2.25.0

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7C8aeb99fc3dd046dbbaa208d7aeb51500%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637169965095304122&sdata=QeFFA07xzLC07niJ9fiBG7g5cxN99GcXHnnM%2BK4PiWg%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200211/38bf5269/attachment.htm>


More information about the amd-gfx mailing list