Skip to contentSkip to conversation

drm/amd/pm: update smu10.h WORKLOAD_PPLIB setting for raven

PATCH In review Changfeng.Zhu 3 participants 3 messages Dec 9, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/pm: update smu10.h WORKLOAD_PPLIB setting for raven

From: changzhu <[email protected]>

From: Changfeng <[email protected]>

When using old WORKLOAD_PPLIB setting in smu10.h, there is problem that it can't be able to switch to mak gpu clk during compute workload. It needs to update WORKLOAD_PPLIB setting to fix this issue.

Change-Id Id2160a7b4a6cb8808d100de25e999714a7ccaebd
---
 drivers/gpu/drm/amd/pm/inc/smu10.h                 | 14 ++++++--------
 .../gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c   |  9 +++------
 2 files changed, 9 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/pm/inc/smu10.h +6 -8
index b96520528240..9e837a5014c5 100644
@@ -136,14 +136,12 @@
 #define FEATURE_CORE_CSTATES_MASK     (1 << FEATURE_CORE_CSTATES_BIT)
 
 /* Workload bits */
-#define WORKLOAD_DEFAULT_BIT              0
-#define WORKLOAD_PPLIB_FULL_SCREEN_3D_BIT 1
-#define WORKLOAD_PPLIB_POWER_SAVING_BIT   2
-#define WORKLOAD_PPLIB_VIDEO_BIT          3
-#define WORKLOAD_PPLIB_VR_BIT             4
-#define WORKLOAD_PPLIB_COMPUTE_BIT        5
-#define WORKLOAD_PPLIB_CUSTOM_BIT         6
-#define WORKLOAD_PPLIB_COUNT              7
+#define WORKLOAD_PPLIB_FULL_SCREEN_3D_BIT 0
+#define WORKLOAD_PPLIB_VIDEO_BIT          2
+#define WORKLOAD_PPLIB_VR_BIT             3
+#define WORKLOAD_PPLIB_COMPUTE_BIT        4
+#define WORKLOAD_PPLIB_CUSTOM_BIT         5
+#define WORKLOAD_PPLIB_COUNT              6
 
 typedef struct {
 	/* MP1_EXT_SCRATCH0 */
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +3 -6
index 04226b1544e4..e57e64bbacdc 100644
@@ -1298,15 +1298,9 @@ static int conv_power_profile_to_pplib_workload(int power_profile)
 	int pplib_workload = 0;
 
 	switch (power_profile) {
-	case PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT:
-		pplib_workload = WORKLOAD_DEFAULT_BIT;
-		break;
 	case PP_SMC_POWER_PROFILE_FULLSCREEN3D:
 		pplib_workload = WORKLOAD_PPLIB_FULL_SCREEN_3D_BIT;
 		break;
-	case PP_SMC_POWER_PROFILE_POWERSAVING:
-		pplib_workload = WORKLOAD_PPLIB_POWER_SAVING_BIT;
-		break;
 	case PP_SMC_POWER_PROFILE_VIDEO:
 		pplib_workload = WORKLOAD_PPLIB_VIDEO_BIT;
 		break;
@@ -1316,6 +1310,9 @@ static int conv_power_profile_to_pplib_workload(int power_profile)
 	case PP_SMC_POWER_PROFILE_COMPUTE:
 		pplib_workload = WORKLOAD_PPLIB_COMPUTE_BIT;
 		break;
+	case PP_SMC_POWER_PROFILE_CUSTOM:
+		pplib_workload = WORKLOAD_PPLIB_CUSTOM_BIT;
+		break;
 	}
 
 	return pplib_workload;
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
maintainer Acked-by on v1 1/1
#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

________________________________
From: amd-gfx <[email protected]> on behalf of Changfeng.Zhu <[email protected]>
Sent: Tuesday, December 8, 2020 9:06 PM
To: [email protected] <[email protected]>; Huang, Ray <[email protected]>
Cc: Zhu, Changfeng <[email protected]>
Subject: [PATCH] drm/amd/pm: update smu10.h WORKLOAD_PPLIB setting for raven

From: changzhu <[email protected]>

From: Changfeng <[email protected]>

When using old WORKLOAD_PPLIB setting in smu10.h, there is problem that it can't be able to switch to mak gpu clk during compute workload. It needs to update WORKLOAD_PPLIB setting to fix this issue.

Change-Id Id2160a7b4a6cb8808d100de25e999714a7ccaebd
---
 drivers/gpu/drm/amd/pm/inc/smu10.h                 | 14 ++++++--------
 .../gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c   |  9 +++------
 2 files changed, 9 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/pm/inc/smu10.h +6 -8
index b96520528240..9e837a5014c5 100644
@@ -136,14 +136,12 @@
 #define FEATURE_CORE_CSTATES_MASK     (1 << FEATURE_CORE_CSTATES_BIT)
 
 /* Workload bits */
-#define WORKLOAD_DEFAULT_BIT              0
-#define WORKLOAD_PPLIB_FULL_SCREEN_3D_BIT 1
-#define WORKLOAD_PPLIB_POWER_SAVING_BIT   2
-#define WORKLOAD_PPLIB_VIDEO_BIT          3
-#define WORKLOAD_PPLIB_VR_BIT             4
-#define WORKLOAD_PPLIB_COMPUTE_BIT        5
-#define WORKLOAD_PPLIB_CUSTOM_BIT         6
-#define WORKLOAD_PPLIB_COUNT              7
+#define WORKLOAD_PPLIB_FULL_SCREEN_3D_BIT 0
+#define WORKLOAD_PPLIB_VIDEO_BIT          2
+#define WORKLOAD_PPLIB_VR_BIT             3
+#define WORKLOAD_PPLIB_COMPUTE_BIT        4
+#define WORKLOAD_PPLIB_CUSTOM_BIT         5
+#define WORKLOAD_PPLIB_COUNT              6
 
 typedef struct {
         /* MP1_EXT_SCRATCH0 */
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +3 -6
index 04226b1544e4..e57e64bbacdc 100644
@@ -1298,15 +1298,9 @@ static int conv_power_profile_to_pplib_workload(int power_profile)
         int pplib_workload = 0;
 
         switch (power_profile) {
-       case PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT:
-               pplib_workload = WORKLOAD_DEFAULT_BIT;
-               break;
         case PP_SMC_POWER_PROFILE_FULLSCREEN3D:
                 pplib_workload = WORKLOAD_PPLIB_FULL_SCREEN_3D_BIT;
                 break;
-       case PP_SMC_POWER_PROFILE_POWERSAVING:
-               pplib_workload = WORKLOAD_PPLIB_POWER_SAVING_BIT;
-               break;
         case PP_SMC_POWER_PROFILE_VIDEO:
                 pplib_workload = WORKLOAD_PPLIB_VIDEO_BIT;
                 break;
@@ -1316,6 +1310,9 @@ static int conv_power_profile_to_pplib_workload(int power_profile)
         case PP_SMC_POWER_PROFILE_COMPUTE:
                 pplib_workload = WORKLOAD_PPLIB_COMPUTE_BIT;
                 break;
+       case PP_SMC_POWER_PROFILE_CUSTOM:
+               pplib_workload = WORKLOAD_PPLIB_CUSTOM_BIT;
+               break;
         }
 
         return pplib_workload;

--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Calexander.deucher%40amd.com%7C2f57b9a4012a424d574908d89be7299b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637430764514589029%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=OWntFjcijTjJa0Qrsi7YTvrEWQcIXM8dHsXxhOaKsng%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#2 lore raw
Quoted 97 lines · Alexander
   [AMD Official Use Only - Internal Distribution Only]

   Acked-by: Alex Deucher <[email protected]>
     __________________________________________________________________

   From: amd-gfx <[email protected]> on behalf of
   Changfeng.Zhu <[email protected]>
   Sent: Tuesday, December 8, 2020 9:06 PM
   To: [email protected] <[email protected]>;
   Huang, Ray <[email protected]>
   Cc: Zhu, Changfeng <[email protected]>
   Subject: [PATCH] drm/amd/pm: update smu10.h WORKLOAD_PPLIB setting for
   raven

   From: changzhu <[email protected]>
   From: Changfeng <[email protected]>
   When using old WORKLOAD_PPLIB setting in smu10.h, there is problem that
   it can't be able to switch to mak gpu clk during compute workload.
   It needs to update WORKLOAD_PPLIB setting to fix this issue.
   Change-Id: Id2160a7b4a6cb8808d100de25e999714a7ccaebd
   Signed-off-by: Changfeng <[email protected]>
   ---
    drivers/gpu/drm/amd/pm/inc/smu10.h                 | 14 ++++++--------
    .../gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c   |  9 +++------
    2 files changed, 9 insertions(+), 14 deletions(-)
   diff --git a/drivers/gpu/drm/amd/pm/inc/smu10.h
   b/drivers/gpu/drm/amd/pm/inc/smu10.h
   index b96520528240..9e837a5014c5 100644
   --- a/drivers/gpu/drm/amd/pm/inc/smu10.h
   +++ b/drivers/gpu/drm/amd/pm/inc/smu10.h
   @@ -136,14 +136,12 @@
    #define FEATURE_CORE_CSTATES_MASK     (1 << FEATURE_CORE_CSTATES_BIT)

    /* Workload bits */
   -#define WORKLOAD_DEFAULT_BIT              0
   -#define WORKLOAD_PPLIB_FULL_SCREEN_3D_BIT 1
   -#define WORKLOAD_PPLIB_POWER_SAVING_BIT   2
   -#define WORKLOAD_PPLIB_VIDEO_BIT          3
   -#define WORKLOAD_PPLIB_VR_BIT             4
   -#define WORKLOAD_PPLIB_COMPUTE_BIT        5
   -#define WORKLOAD_PPLIB_CUSTOM_BIT         6
   -#define WORKLOAD_PPLIB_COUNT              7
   +#define WORKLOAD_PPLIB_FULL_SCREEN_3D_BIT 0
   +#define WORKLOAD_PPLIB_VIDEO_BIT          2
   +#define WORKLOAD_PPLIB_VR_BIT             3
   +#define WORKLOAD_PPLIB_COMPUTE_BIT        4
   +#define WORKLOAD_PPLIB_CUSTOM_BIT         5
   +#define WORKLOAD_PPLIB_COUNT              6

    typedef struct {
            /* MP1_EXT_SCRATCH0 */
   diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c
   b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c
   index 04226b1544e4..e57e64bbacdc 100644
   --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c
   +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c
   @@ -1298,15 +1298,9 @@ static int
   conv_power_profile_to_pplib_workload(int power_profile)
            int pplib_workload = 0;

            switch (power_profile) {
   -       case PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT:
   -               pplib_workload = WORKLOAD_DEFAULT_BIT;
   -               break;
            case PP_SMC_POWER_PROFILE_FULLSCREEN3D:
                    pplib_workload = WORKLOAD_PPLIB_FULL_SCREEN_3D_BIT;
                    break;
   -       case PP_SMC_POWER_PROFILE_POWERSAVING:
   -               pplib_workload = WORKLOAD_PPLIB_POWER_SAVING_BIT;
   -               break;
            case PP_SMC_POWER_PROFILE_VIDEO:
                    pplib_workload = WORKLOAD_PPLIB_VIDEO_BIT;
                    break;
   @@ -1316,6 +1310,9 @@ static int
   conv_power_profile_to_pplib_workload(int power_profile)
            case PP_SMC_POWER_PROFILE_COMPUTE:
                    pplib_workload = WORKLOAD_PPLIB_COMPUTE_BIT;
                    break;
   +       case PP_SMC_POWER_PROFILE_CUSTOM:
   +               pplib_workload = WORKLOAD_PPLIB_CUSTOM_BIT;
   +               break;
            }

            return pplib_workload;
   --
   2.17.1
   _______________________________________________
   amd-gfx mailing list
   [email protected]
   [1]https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
   sts.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Ca
   lexander.deucher%40amd.com%7C2f57b9a4012a424d574908d89be7299b%7C3dd8961
   fe4884e608e11a82d994e183d%7C0%7C0%7C637430764514589029%7CUnknown%7CTWFp
   bGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0
   %3D%7C1000&amp;sdata=OWntFjcijTjJa0Qrsi7YTvrEWQcIXM8dHsXxhOaKsng%3D&amp
   ;reserved=0
Quoted 3 lines

References

1. https://nam11.safelinks.protection.outlook.com/?url=https://lists.freedesktop.org/mailman/listinfo/amd-gfx&amp;data=04|01|[email protected]|2f57b9a4012a424d574908d89be7299b|3dd8961fe4884e608e11a82d994e183d|0|0|637430764514589029|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0=|1000&amp;sdata=OWntFjcijTjJa0Qrsi7YTvrEWQcIXM8dHsXxhOaKsng=&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx