drm/amd/amdgpu: shorten the gfx idle worker timeout
Subsystems (3)
Kenneth Feng
maintainerPATCH 1/2 drm/amd/amdgpu: shorten the gfx idle worker timeout
Shorten the gfx idle worker timeout. This is to sync with DAL when there is no activity on the screen. Original 1 second can not sync with DAL, so DAL can not apply MALL when the workload type is not bootup default.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +1 -1
@@ -58,7 +58,7 @@ enum amdgpu_gfx_pipe_priority {#define AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM 15/* 1 second timeout */ -#define GFX_PROFILE_IDLE_TIMEOUT msecs_to_jiffies(1000) +#define GFX_PROFILE_IDLE_TIMEOUT msecs_to_jiffies(10)enum amdgpu_gfx_partition {AMDGPU_SPX_PARTITION_MODE =0 ,
Signature · 1 line
2.34.1
Kenneth Feng
maintainerPATCH 2/2 drm/amd/pm: prevent skipping the workload setting back to bootup default
This is a bug fix. The scenario is that the same client can add the certain workload type refcount multiple times. Then the same client can not remove this setting when it wants to get back to the default bootup workload.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -1
@@ -2273,7 +2273,8 @@ static int smu_bump_power_profile_mode(struct smu_context *smu,static void smu_power_profile_mode_get (struct smu_context *smu,enum PP_SMC_POWER_PROFILE profile_mode) { - smu->workload_refcount[profile_mode]++; +if (!smu->workload_refcount[profile_mode]) + smu->workload_refcount[profile_mode]++; } static void smu_power_profile_mode_put(struct smu_context *smu,
Signature · 1 line
2.34.1
RE: [PATCH 2/2] drm/amd/pm: prevent skipping the workload setting back to bootup default
[AMD Official Use Only - AMD Internal Distribution Only]
Please add following information into commit message.
Series is
Best Regards,
Kevin
-----Original Message-----
From: Kenneth Feng <[email protected]>
Sent: Tuesday, March 11, 2025 16:55
To: [email protected]
Cc: Wang, Yang(Kevin) <[email protected]>; Deucher, Alexander <[email protected]>; Feng, Kenneth <[email protected]>
Subject: [PATCH 2/2] drm/amd/pm: prevent skipping the workload setting back to bootup default
This is a bug fix. The scenario is that the same client can add the certain workload type refcount multiple times. Then the same client can not remove this setting when it wants to get back to the default bootup workload.
--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -2
@@ -2273,7 +2273,8 @@ static int smu_bump_power_profile_mode(struct smu_context *smu, static void smu_power_profile_mode_get(struct smu_context *smu, enum PP_SMC_POWER_PROFILE profile_mode) { - smu->workload_refcount[profile_mode]++; +if (!smu->workload_refcount[profile_mode]) + smu->workload_refcount[profile_mode]++; } static void smu_power_profile_mode_put(struct smu_context *smu, --
2.34.1
Re: [PATCH 2/2] drm/amd/pm: prevent skipping the workload setting back to bootup default
In reply to Kenneth FengQuoted 4 lines · Kenneth Feng
This is a bug fix. The scenario is that the same client can add the certain workload type refcount multiple times. Then the same client can not remove this setting when it wants to get back to the default bootup workload.
This will break the ref count handling.
Alex
Quoted 23 lines
Signed-off-by Kenneth Feng <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2
-2@@ -2273,7 +2273,8 @@ static int smu_bump_power_profile_mode(struct smu_context *smu,static void smu_power_profile_mode_get (struct smu_context *smu,enum PP_SMC_POWER_PROFILE profile_mode) { - smu->workload_refcount[profile_mode]++; +if (!smu->workload_refcount[profile_mode]) + smu->workload_refcount[profile_mode]++; } static void smu_power_profile_mode_put(struct smu_context *smu, --2.34.1
[AMD Official Use Only - AMD Internal Distribution Only]
Please correct the code comments before committing the patch.
/* 1 second timeout */ 10ms
With that fixed,
Best Regards,
Kevin
-----Original Message-----
From: Kenneth Feng <[email protected]>
Sent: Tuesday, March 11, 2025 16:55
To: [email protected]
Cc: Wang, Yang(Kevin) <[email protected]>; Deucher, Alexander <[email protected]>; Feng, Kenneth <[email protected]>
Subject: [PATCH 1/2] drm/amd/amdgpu: shorten the gfx idle worker timeout
Shorten the gfx idle worker timeout. This is to sync with DAL when there is no activity on the screen. Original 1 second can not sync with DAL, so DAL can not apply MALL when the workload type is not bootup default.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +1 -2
@@ -58,7 +58,7 @@ enum amdgpu_gfx_pipe_priority { #define AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM 15/* 1 second timeout */ -#define GFX_PROFILE_IDLE_TIMEOUT msecs_to_jiffies(1000) +#define GFX_PROFILE_IDLE_TIMEOUT msecs_to_jiffies(10)enum amdgpu_gfx_partition {AMDGPU_SPX_PARTITION_MODE =0 , --
2.34.1