[PATCH v2 3/3] drm/amdgpu: Warn about disabled DPM
Paul Menzel
pmenzel at molgen.mpg.de
Fri Jun 19 18:50:09 UTC 2020
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://gitlab.freedesktop.org/drm/amd/-/issues/1173
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");
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)
--
2.27.0
More information about the amd-gfx
mailing list