[PATCH v2 3/3] drm/amdgpu: Warn about disabled DPM

Christian König christian.koenig at amd.com
Mon Jun 22 13:39:05 UTC 2020


Am 19.06.20 um 20:50 schrieb Paul Menzel:
> Currently, besides there is no explicit message, that DPM is disabled.
> The user would need to know, that the missing success line indicates
> that.
>
>      [drm] amdgpu: dpm initialized
>
> So, add an explicit message, and make it log level warning, as disabling
> dpm is not the default, and device performance will most likely suffer.
>
> Resolves: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1173&data=02%7C01%7Cchristian.koenig%40amd.com%7Ca93f6121c2ab464b7c1908d81481a24a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637281894303394855&sdata=lbcpB8H9TnbISG8VFfciKh%2FKGC7YwkVYxUf4Y7dDVt8%3D&reserved=0
> Cc: amd-gfx at lists.freedesktop.org
> Signed-off-by: Paul Menzel <pmenzel at molgen.mpg.de>
> ---
> v2: Use new print helpers, and inform user about effects.
>
>   drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 4 +++-
>   drivers/gpu/drm/amd/amdgpu/si_dpm.c | 4 +++-
>   2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> index f054ded902f2..c601587c6d59 100644
> --- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> @@ -3014,8 +3014,10 @@ static int kv_dpm_sw_init(void *handle)
>   	adev->pm.current_mclk = adev->clock.default_mclk;
>   	adev->pm.int_thermal_type = THERMAL_TYPE_NONE;
>   
> -	if (amdgpu_dpm == 0)
> +	if (amdgpu_dpm == 0) {
> +		drm_warn(adev, "amdgpu: dpm disabled per parameter. Your graphics device will run with lower clocks impacting graphics performance.\n");

I'm not very keen about this. When an user specifies that DPM shouldn't 
be used the driver doesn't need to inform the user about this once more.

In other words shooting in your own foot is supposed to hurt.

Christian.

>   		return 0;
> +	}
>   
>   	INIT_WORK(&adev->pm.dpm.thermal.work, amdgpu_dpm_thermal_work_handler);
>   	mutex_lock(&adev->pm.mutex);
> diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> index f7edc1d50df4..1f35d5a36300 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> @@ -7687,8 +7687,10 @@ static int si_dpm_sw_init(void *handle)
>   	adev->pm.current_mclk = adev->clock.default_mclk;
>   	adev->pm.int_thermal_type = THERMAL_TYPE_NONE;
>   
> -	if (amdgpu_dpm == 0)
> +	if (amdgpu_dpm == 0) {
> +		drm_warn(adev, "amdgpu: dpm disabled per parameter. Your graphics device will run with lower clocks impacting graphics performance.\n");
>   		return 0;
> +	}
>   
>   	ret = si_dpm_init_microcode(adev);
>   	if (ret)



More information about the amd-gfx mailing list