From: "Lazar, Lijo" <lijo.lazar@amd.com>
To: "Quan, Evan" <Evan.Quan@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "nils.wallmenius@gmail.com" <nils.wallmenius@gmail.com>,
"Chen, Guchun" <Guchun.Chen@amd.com>
Subject: Re: [PATCH V2 6/7] drm/amd/pm: drop unnecessary manual mode check
Date: Thu, 12 Aug 2021 14:39:34 +0530 [thread overview]
Message-ID: <0d72759a-975c-f0ea-49d8-eac32f8035ef@amd.com> (raw)
In-Reply-To: <DM6PR12MB261966A80354E978DA926CF1E4F99@DM6PR12MB2619.namprd12.prod.outlook.com>
On 8/12/2021 1:49 PM, Quan, Evan wrote:
> [AMD Official Use Only]
>
>
>
>> -----Original Message-----
>> From: Lazar, Lijo <Lijo.Lazar@amd.com>
>> Sent: Thursday, August 12, 2021 3:38 PM
>> To: Quan, Evan <Evan.Quan@amd.com>; amd-gfx@lists.freedesktop.org
>> Cc: nils.wallmenius@gmail.com; Chen, Guchun <Guchun.Chen@amd.com>
>> Subject: Re: [PATCH V2 6/7] drm/amd/pm: drop unnecessary manual mode
>> check
>>
>>
>>
>> On 8/12/2021 12:16 PM, Quan, Evan wrote:
>>> [AMD Official Use Only]
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: Lazar, Lijo <Lijo.Lazar@amd.com>
>>>> Sent: Thursday, August 12, 2021 2:16 PM
>>>> To: Quan, Evan <Evan.Quan@amd.com>; amd-gfx@lists.freedesktop.org
>>>> Cc: nils.wallmenius@gmail.com; Chen, Guchun <Guchun.Chen@amd.com>
>>>> Subject: Re: [PATCH V2 6/7] drm/amd/pm: drop unnecessary manual
>> mode
>>>> check
>>>>
>>>>
>>>>
>>>> On 8/12/2021 9:31 AM, Evan Quan wrote:
>>>>> As the fan control was guarded under manual mode before fan speed
>>>>> RPM/PWM setting. Thus the extra check is totally redundant.
>>>>>
>>>>> Change-Id: Ia9d776141ec4aa39255accbf00d7e7ed81c8424d
>>>>> Signed-off-by: Evan Quan <evan.quan@amd.com>
>>>>> ---
>>>>> drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 12 +----------
>> -
>>>>> 1 file changed, 1 insertion(+), 11 deletions(-)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
>>>>> b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
>>>>> index 9001952442ba..20ece0963f51 100644
>>>>> --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
>>>>> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
>>>>> @@ -1208,9 +1208,6 @@ smu_v11_0_set_fan_speed_pwm(struct
>>>> smu_context
>>>>> *smu, uint32_t speed)
>>>>>
>>>>> speed = MIN(speed, 255);
>>>>>
>>>>> - if (smu_v11_0_auto_fan_control(smu, 0))
>>>>> - return -EINVAL;
>>>>> -
>>>>
>>>> There is a FAN_CONTROL_NONE mode where it is set to full speed. Is
>>>> that affected by this change?
>>> [Quan, Evan] This check was designed to block "auto" mode(like If it was
>> under auto mode, these manual settings will be not permitted).
>>> The FAN_CONTROL_NONE mode is not affected with and without this
>> check.
>>>
>>
>> To set FAN_CONTROL_NONE, basically also need to turn off auto mode and
>> manually set to 100% speed. If we take out turning off auto mode here,
>> probably that part needs to be handled elsewhere.
> [Quan, Evan] OK, I see. Will add that for AMD_FAN_CTRL_NONE in smu_v11_0_set_fan_control_mode(). That's the right place for mode switching.
>
Yes, that is the right place.
Thanks,
Lijo
> BR
> Evan
>>
>> Thanks,
>> Lijo
>>
>>> BR
>>> Evan
>>>>
>>>> Thanks,
>>>> Lijo
>>>>
>>>>> duty100 = REG_GET_FIELD(RREG32_SOC15(THM, 0,
>>>> mmCG_FDO_CTRL1),
>>>>> CG_FDO_CTRL1, FMAX_DUTY100);
>>>>> if (!duty100)
>>>>> @@ -1237,11 +1234,6 @@ int smu_v11_0_set_fan_speed_rpm(struct
>>>> smu_context *smu,
>>>>> */
>>>>> uint32_t crystal_clock_freq = 2500;
>>>>> uint32_t tach_period;
>>>>> - int ret;
>>>>> -
>>>>> - ret = smu_v11_0_auto_fan_control(smu, 0);
>>>>> - if (ret)
>>>>> - return ret;
>>>>>
>>>>> /*
>>>>> * To prevent from possible overheat, some ASICs may have
>>>>> requirement @@ -1257,9 +1249,7 @@ int
>>>> smu_v11_0_set_fan_speed_rpm(struct smu_context *smu,
>>>>> CG_TACH_CTRL, TARGET_PERIOD,
>>>>> tach_period));
>>>>>
>>>>> - ret = smu_v11_0_set_fan_static_mode(smu,
>>>> FDO_PWM_MODE_STATIC_RPM);
>>>>> -
>>>>> - return ret;
>>>>> + return smu_v11_0_set_fan_static_mode(smu,
>>>> FDO_PWM_MODE_STATIC_RPM);
>>>>> }
>>>>>
>>>>> int smu_v11_0_get_fan_speed_pwm(struct smu_context *smu,
>>>>>
next prev parent reply other threads:[~2021-08-12 9:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 4:01 [PATCH V2 1/7] drm/amd/pm: correct the fan speed RPM setting Evan Quan
2021-08-12 4:01 ` [PATCH V2 2/7] drm/amd/pm: record the RPM and PWM based fan speed settings Evan Quan
2021-08-12 6:05 ` Lazar, Lijo
2021-08-12 6:51 ` Quan, Evan
2021-08-12 7:52 ` Lazar, Lijo
2021-08-12 8:49 ` Quan, Evan
2021-08-12 9:11 ` Lazar, Lijo
2021-08-12 4:01 ` [PATCH V2 3/7] drm/amd/pm: correct the fan speed PWM retrieving Evan Quan
2021-08-12 4:01 ` [PATCH V2 4/7] drm/amd/pm: correct the fan speed RPM retrieving Evan Quan
2021-08-12 4:01 ` [PATCH V2 5/7] drm/amd/pm: drop the unnecessary intermediate percent-based transition Evan Quan
2021-08-12 4:01 ` [PATCH V2 6/7] drm/amd/pm: drop unnecessary manual mode check Evan Quan
2021-08-12 6:15 ` Lazar, Lijo
2021-08-12 6:46 ` Quan, Evan
2021-08-12 7:38 ` Lazar, Lijo
2021-08-12 8:19 ` Quan, Evan
2021-08-12 9:09 ` Lazar, Lijo [this message]
2021-08-12 4:01 ` [PATCH V2 7/7] drm/amd/pm: correct the address of Arcturus fan related registers Evan Quan
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=0d72759a-975c-f0ea-49d8-eac32f8035ef@amd.com \
--to=lijo.lazar@amd.com \
--cc=Evan.Quan@amd.com \
--cc=Guchun.Chen@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=nils.wallmenius@gmail.com \
/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