drm/amd/pm: make the error log more clear for fine grain tuning function
Subsystems (3)
PATCH 1/1 drm/amd/pm: make the error log more clear for fine grain tuning function
From: Xiaojian Du <[email protected]>
From: Xiaojian Du <[email protected]>
This patch is to make the error log more clear for fine grian tuning function, it covers Raven/Raven2/Picasso/Renoir/Vangogh.
The fine grain tuning function uses the sysfs file -- pp_od_clk_voltage, but only when another sysfs file -- power_dpm_force_performance_level is switched to "manual" mode, it is allowd to access "pp_od_clk_voltage".
--- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +1 -1
@@ -1487,7 +1487,7 @@ static int smu10_set_fine_grain_clk_vol(struct pp_hwmgr *hwmgr, }if (!smu10_data->fine_grain_enabled) { -pr_err ("Fine grain not started\n" ); +pr_err ("pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );return -EINVAL ; }
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +2 -1
@@ -1452,7 +1452,8 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TABstruct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) { -dev_warn (smu->adev->dev,"Fine grain is not enabled!\n" ); +dev_warn (smu->adev->dev, +"pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );return -EINVAL ; }
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c +2 -1
@@ -350,7 +350,8 @@ static int renoir_od_edit_dpm_table(struct smu_context *smu,struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) { -dev_warn (smu->adev->dev,"Fine grain is not enabled!\n" ); +dev_warn (smu->adev->dev, +"pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );return -EINVAL ; }
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
________________________________
From: Du, Xiaojian <[email protected]>
Sent: Wednesday, January 20, 2021 11:48 AM
To: [email protected] <[email protected]>
Cc: Huang, Ray <[email protected]>; Quan, Evan <[email protected]>; Wang, Kevin(Yang) <[email protected]>; Lazar, Lijo <[email protected]>; Du, Xiaojian <[email protected]>; Du, Xiaojian <[email protected]>
Subject: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function
From: Xiaojian Du <[email protected]>
From: Xiaojian Du <[email protected]>
This patch is to make the error log more clear for fine grian tuning function, it covers Raven/Raven2/Picasso/Renoir/Vangogh.
The fine grain tuning function uses the sysfs file -- pp_od_clk_voltage, but only when another sysfs file -- power_dpm_force_performance_level is switched to "manual" mode, it is allowd to access "pp_od_clk_voltage".
--- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +1 -1
@@ -1487,7 +1487,7 @@ static int smu10_set_fine_grain_clk_vol(struct pp_hwmgr *hwmgr, }if (!smu10_data->fine_grain_enabled) { -pr_err ("Fine grain not started\n" ); +pr_err ("pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );
[kevin]:
for above codes, the old one looks better for me, i prefer to keep current design.
Best Regards,
Kevin
return -EINVAL;
}drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +2 -1
@@ -1452,7 +1452,8 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TABstruct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) { -dev_warn (smu->adev->dev,"Fine grain is not enabled!\n" ); +dev_warn (smu->adev->dev, +"pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );return -EINVAL ; }
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c +2 -1
@@ -350,7 +350,8 @@ static int renoir_od_edit_dpm_table(struct smu_context *smu,struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) { -dev_warn (smu->adev->dev,"Fine grain is not enabled!\n" ); +dev_warn (smu->adev->dev, +"pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );return -EINVAL ;
[Kevin]:
Just tell the User what's going on, not why.
and we'd better make a function to check manual mode , then embed it to every sysfs node in amdgpu_pm.c using a unify interface to return result to user.
Best Regards,
Kevin
}
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Huang, Ray
Acked-by Huang Rui[AMD Official Use Only - Internal Distribution Only]
+ Alex
Hi all,
Recently, many users reported the issue to us that fine grain not enabled. Actually, most of them are just caused by not switching to “manual” mode.
if (!(smu_dpm_ctx->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL)) {- dev_warn(smu->adev->dev, "Fine grain is not enabled!\n");
+ dev_warn(smu->adev->dev,
+ "pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n");
We have to need reminder in the warning message to tell the user where they are.
Any objection for this patch? I found Navi series actually didn’t need this operation to update max/min clock levels. Would you clarify whether dGPU still needs this before we move the prints into amdgpu_pm.c?
However, in APU fine grain design, patch looks good for me.
Thanks,
Ray
From: Wang, Kevin(Yang) <[email protected]>
Sent: Wednesday, January 20, 2021 12:10 PM
To: Du, Xiaojian <[email protected]>; [email protected]
Cc: Huang, Ray <[email protected]>; Quan, Evan <[email protected]>; Lazar, Lijo <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function
[AMD Official Use Only - Internal Distribution Only]
________________________________
From: Du, Xiaojian <[email protected]<mailto:[email protected]>>
Sent: Wednesday, January 20, 2021 11:48 AM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Huang, Ray <[email protected]<mailto:[email protected]>>; Quan, Evan <[email protected]<mailto:[email protected]>>; Wang, Kevin(Yang) <[email protected]<mailto:[email protected]>>; Lazar, Lijo <[email protected]<mailto:[email protected]>>; Du, Xiaojian <[email protected]<mailto:[email protected]>>; Du, Xiaojian <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function
From: Xiaojian Du <[email protected]<mailto:[email protected]>>
From: Xiaojian Du <[email protected]<mailto:[email protected]>>
This patch is to make the error log more clear for fine grian tuning function, it covers Raven/Raven2/Picasso/Renoir/Vangogh.
The fine grain tuning function uses the sysfs file -- pp_od_clk_voltage, but only when another sysfs file -- power_dpm_force_performance_level is switched to "manual" mode, it is allowd to access "pp_od_clk_voltage".
--- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +1 -1
@@ -1487,7 +1487,7 @@ static int smu10_set_fine_grain_clk_vol(struct pp_hwmgr *hwmgr, }if (!smu10_data->fine_grain_enabled) { -pr_err ("Fine grain not started\n" ); +pr_err ("pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );
[kevin]:
for above codes, the old one looks better for me, i prefer to keep current design.
Best Regards,
Kevin
return -EINVAL;
}drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +2 -1
@@ -1452,7 +1452,8 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TABstruct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) { -dev_warn (smu->adev->dev,"Fine grain is not enabled!\n" ); +dev_warn (smu->adev->dev, +"pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );return -EINVAL ; }
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c +2 -1
@@ -350,7 +350,8 @@ static int renoir_od_edit_dpm_table(struct smu_context *smu,struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) { -dev_warn (smu->adev->dev,"Fine grain is not enabled!\n" ); +dev_warn (smu->adev->dev, +"pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );return -EINVAL ;
[Kevin]:
Just tell the User what's going on, not why.
and we'd better make a function to check manual mode , then embed it to every sysfs node in amdgpu_pm.c using a unify interface to return result to user.
Best Regards,
Kevin
}
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
If it is not in manual mode, we should give the user a hint.
if possible, we should move this check into amdgpu_pm.c , it is also can be used swsmu backend.
the patch is
Best Regards,
Kevin
________________________________
From: Huang, Ray <[email protected]>
Sent: Tuesday, February 9, 2021 12:10 PM
To: Wang, Kevin(Yang) <[email protected]>; Du, Xiaojian <[email protected]>; [email protected] <[email protected]>; Deucher, Alexander <[email protected]>
Cc: Quan, Evan <[email protected]>; Lazar, Lijo <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function
[AMD Official Use Only - Internal Distribution Only]
+ Alex
Hi all,
Recently, many users reported the issue to us that fine grain not enabled. Actually, most of them are just caused by not switching to “manual” mode.
if (!(smu_dpm_ctx->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL)) {- dev_warn(smu->adev->dev, "Fine grain is not enabled!\n");
+ dev_warn(smu->adev->dev,
+ "pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n");
We have to need reminder in the warning message to tell the user where they are.
Any objection for this patch? I found Navi series actually didn’t need this operation to update max/min clock levels. Would you clarify whether dGPU still needs this before we move the prints into amdgpu_pm.c?
However, in APU fine grain design, patch looks good for me.
Thanks,
Ray
From: Wang, Kevin(Yang) <[email protected]>
Sent: Wednesday, January 20, 2021 12:10 PM
To: Du, Xiaojian <[email protected]>; [email protected]
Cc: Huang, Ray <[email protected]>; Quan, Evan <[email protected]>; Lazar, Lijo <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function
[AMD Official Use Only - Internal Distribution Only]
________________________________
From: Du, Xiaojian <[email protected]<mailto:[email protected]>>
Sent: Wednesday, January 20, 2021 11:48 AM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Huang, Ray <[email protected]<mailto:[email protected]>>; Quan, Evan <[email protected]<mailto:[email protected]>>; Wang, Kevin(Yang) <[email protected]<mailto:[email protected]>>; Lazar, Lijo <[email protected]<mailto:[email protected]>>; Du, Xiaojian <[email protected]<mailto:[email protected]>>; Du, Xiaojian <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function
From: Xiaojian Du <[email protected]<mailto:[email protected]>>
From: Xiaojian Du <[email protected]<mailto:[email protected]>>
This patch is to make the error log more clear for fine grian tuning function, it covers Raven/Raven2/Picasso/Renoir/Vangogh.
The fine grain tuning function uses the sysfs file -- pp_od_clk_voltage, but only when another sysfs file -- power_dpm_force_performance_level is switched to "manual" mode, it is allowd to access "pp_od_clk_voltage".
--- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +1 -1
@@ -1487,7 +1487,7 @@ static int smu10_set_fine_grain_clk_vol(struct pp_hwmgr *hwmgr, }if (!smu10_data->fine_grain_enabled) { -pr_err ("Fine grain not started\n" ); +pr_err ("pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );
[kevin]:
for above codes, the old one looks better for me, i prefer to keep current design.
Best Regards,
Kevin
return -EINVAL;
}drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +2 -1
@@ -1452,7 +1452,8 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TABstruct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) { -dev_warn (smu->adev->dev,"Fine grain is not enabled!\n" ); +dev_warn (smu->adev->dev, +"pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );return -EINVAL ; }
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c +2 -1
@@ -350,7 +350,8 @@ static int renoir_od_edit_dpm_table(struct smu_context *smu,struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) { -dev_warn (smu->adev->dev,"Fine grain is not enabled!\n" ); +dev_warn (smu->adev->dev, +"pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );return -EINVAL ;
[Kevin]:
Just tell the User what's going on, not why.
and we'd better make a function to check manual mode , then embed it to every sysfs node in amdgpu_pm.c
using a unify interface to return result to user.
Best Regards,
Kevin
}
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
We should try and the behavior as consistent as possible.
Thanks!
Alex
________________________________
From: Wang, Kevin(Yang) <[email protected]>
Sent: Tuesday, February 9, 2021 12:27 AM
To: Huang, Ray <[email protected]>; Du, Xiaojian <[email protected]>; [email protected] <[email protected]>; Deucher, Alexander <[email protected]>
Cc: Quan, Evan <[email protected]>; Lazar, Lijo <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function
[AMD Official Use Only - Internal Distribution Only]
If it is not in manual mode, we should give the user a hint.
if possible, we should move this check into amdgpu_pm.c , it is also can be used swsmu backend.
the patch is
Best Regards,
Kevin
________________________________
From: Huang, Ray <[email protected]>
Sent: Tuesday, February 9, 2021 12:10 PM
To: Wang, Kevin(Yang) <[email protected]>; Du, Xiaojian <[email protected]>; [email protected] <[email protected]>; Deucher, Alexander <[email protected]>
Cc: Quan, Evan <[email protected]>; Lazar, Lijo <[email protected]>
Subject: RE: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function
[AMD Official Use Only - Internal Distribution Only]
+ Alex
Hi all,
Recently, many users reported the issue to us that fine grain not enabled. Actually, most of them are just caused by not switching to “manual” mode.
if (!(smu_dpm_ctx->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL)) {- dev_warn(smu->adev->dev, "Fine grain is not enabled!\n");
+ dev_warn(smu->adev->dev,
+ "pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n");
We have to need reminder in the warning message to tell the user where they are.
Any objection for this patch? I found Navi series actually didn’t need this operation to update max/min clock levels. Would you clarify whether dGPU still needs this before we move the prints into amdgpu_pm.c?
However, in APU fine grain design, patch looks good for me.
Thanks,
Ray
From: Wang, Kevin(Yang) <[email protected]>
Sent: Wednesday, January 20, 2021 12:10 PM
To: Du, Xiaojian <[email protected]>; [email protected]
Cc: Huang, Ray <[email protected]>; Quan, Evan <[email protected]>; Lazar, Lijo <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function
[AMD Official Use Only - Internal Distribution Only]
________________________________
From: Du, Xiaojian <[email protected]<mailto:[email protected]>>
Sent: Wednesday, January 20, 2021 11:48 AM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Huang, Ray <[email protected]<mailto:[email protected]>>; Quan, Evan <[email protected]<mailto:[email protected]>>; Wang, Kevin(Yang) <[email protected]<mailto:[email protected]>>; Lazar, Lijo <[email protected]<mailto:[email protected]>>; Du, Xiaojian <[email protected]<mailto:[email protected]>>; Du, Xiaojian <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amd/pm: make the error log more clear for fine grain tuning function
From: Xiaojian Du <[email protected]<mailto:[email protected]>>
From: Xiaojian Du <[email protected]<mailto:[email protected]>>
This patch is to make the error log more clear for fine grian tuning function, it covers Raven/Raven2/Picasso/Renoir/Vangogh.
The fine grain tuning function uses the sysfs file -- pp_od_clk_voltage, but only when another sysfs file -- power_dpm_force_performance_level is switched to "manual" mode, it is allowd to access "pp_od_clk_voltage".
--- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 2 +- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 3 ++- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +1 -1
@@ -1487,7 +1487,7 @@ static int smu10_set_fine_grain_clk_vol(struct pp_hwmgr *hwmgr, }if (!smu10_data->fine_grain_enabled) { -pr_err ("Fine grain not started\n" ); +pr_err ("pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );
[kevin]:
for above codes, the old one looks better for me, i prefer to keep current design.
Best Regards,
Kevin
return -EINVAL;
}drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +2 -1
@@ -1452,7 +1452,8 @@ static int vangogh_od_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_TABstruct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) { -dev_warn (smu->adev->dev,"Fine grain is not enabled!\n" ); +dev_warn (smu->adev->dev, +"pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );return -EINVAL ; }
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c +2 -1
@@ -350,7 +350,8 @@ static int renoir_od_edit_dpm_table(struct smu_context *smu,struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);if (!(smu_dpm_ctx->dpm_level ==AMD_DPM_FORCED_LEVEL_MANUAL )) { -dev_warn (smu->adev->dev,"Fine grain is not enabled!\n" ); +dev_warn (smu->adev->dev, +"pp_od_clk_voltage is not accessible if power_dpm_force_perfomance_level is not in manual mode!\n" );return -EINVAL ;
[Kevin]:
Just tell the User what's going on, not why.
and we'd better make a function to check manual mode , then embed it to every sysfs node in amdgpu_pm.c
using a unify interface to return result to user.
Best Regards,
Kevin
}
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx