From: "Christian König" <christian.koenig@amd.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>,
Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 3/3] drm/amdgpu: Warn about disabled DPM
Date: Mon, 22 Jun 2020 19:41:12 +0200 [thread overview]
Message-ID: <e4c8cbb6-1a36-bade-eec4-85a52b7a0275@amd.com> (raw)
In-Reply-To: <5916b5fa-cc2d-f8df-ca55-505034f09f58@molgen.mpg.de>
Am 22.06.20 um 19:25 schrieb Paul Menzel:
> Dear Christian,
>
>
> Am 22.06.20 um 15:39 schrieb Christian König:
>> 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%7C72d0b71d439e46d6253f08d816d150c6%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637284435558396492&sdata=5EXY1o1zwXJRzN9fqpUg%2BQNJGB3zAlWKnGWsdFXRcjA%3D&reserved=0
>>
>
> That URL is not mine. ;-)
>
>>> Cc: amd-gfx@lists.freedesktop.org
>>> Signed-off-by: Paul Menzel <pmenzel@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.
>
> Maybe. The other point of view is, how does having the clarity in the
> logs hurt?
Well, you are spamming the logs with a warning about an intentional
behavior.
> For example, if the user added the parameter intentionally, maybe they
> made a typo, and it’s actually not applied. Or there is a bug in the
> parameter handling. Having explicit log messages is good in my opinion.
>
> Secondly, the parameter could have been left there unintentionally.
> Having the message in the logs, makes the user aware of tha.
And exactly for this reason the kernel command line is printed as the
second line of the logs.
Duplicating this in each driver is not only overkill, but also very
error prone.
Sorry, but this is absolutely don't think that this is a good idea.
Regards,
Christian.
>
>
> Kind regards,
>
> Paul
>
>
>>> 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)
>>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2020-06-22 17:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-19 18:50 [PATCH v2 1/3] drm/amdgpu/kv,si: DPM: Use new print helpers Paul Menzel
2020-06-19 18:50 ` [PATCH v2 2/3] drm/amdgpu: Inform user about effect of running without DPM Paul Menzel
2020-06-19 18:50 ` [PATCH v2 3/3] drm/amdgpu: Warn about disabled DPM Paul Menzel
2020-06-22 13:39 ` Christian König
2020-06-22 17:25 ` Paul Menzel
2020-06-22 17:41 ` Christian König [this message]
2020-06-22 21:41 ` Paul Menzel
2020-06-23 7:35 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e4c8cbb6-1a36-bade-eec4-85a52b7a0275@amd.com \
--to=christian.koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=pmenzel@molgen.mpg.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox