From: Eric Huang Subject: Re: [PATCH 10/10] drm/amd/pp: Enable auto automan feature on Polaris Date: Thu, 8 Feb 2018 11:58:19 -0500 Message-ID: <53db2f8b-e62c-9df1-329d-0b7c1f458a80@amd.com> References: <1518081259-18120-1-git-send-email-Rex.Zhu@amd.com> <1518081259-18120-11-git-send-email-Rex.Zhu@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0968565655==" Return-path: In-Reply-To: Content-Language: en-US List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "amd-gfx" To: "Zhu, Rex" , "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org" This is a multi-part message in MIME format. --===============0968565655== Content-Type: multipart/alternative; boundary="------------61B32BCD4F85128E06808873" Content-Language: en-US This is a multi-part message in MIME format. --------------61B32BCD4F85128E06808873 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Is the switching automatically by driver or manually by user? Regards, Eric On 2018-02-08 11:54 AM, Zhu, Rex wrote: > > >In case of compute, we have auto switching mechanism. when compute ring > is coming, it switches to the default compute profile or user set > profile, >and switches back when it's done. So VR should be doing the > same thing with compute. Auto wattman will be disabled when profile > auto switching >happens. > > > Rex: Ok, the logic is same. > > when computer ring begins,  set manual dpm mode(pp do nothing except > disable auto wattman feature), and set compute profile or  custom profile. > > set clock range. and set auto dpm mode, switch back > > > Best Regards > > Rex > > > > > ------------------------------------------------------------------------ > *From:* amd-gfx on behalf of > Eric Huang > *Sent:* Friday, February 9, 2018 12:47 AM > *To:* amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > *Subject:* Re: [PATCH 10/10] drm/amd/pp: Enable auto automan feature > on Polaris > > > > On 2018-02-08 11:35 AM, Zhu, Rex wrote: >> >> >But in auto mode, we may want to force a particular profile within the >> >driver for a specific use case.  E.g., for VR, we may want to select >> >the VR profile when the user sets the priority to high in the context >> >ioctl, and then switch it back to autowattman or the default profile >> >when the context if freed or the priority is changes.  We may want to >> >do something similar for video when the user submits work to the >> >multi-media engines. >> >> >  I guess it should just be >> >a matter of disabling autowattman and switching to a profile when the >> >driver needs it and then switching back when it's done. >> >> >> Rex: >> >>        For MM, we can disable auto wattman (if enabled), and set >> video profile mode when enable uvd/vce dpm on smu7. >> >>       restore to default when disable uvd/vce dpm when engine idle. >> >>          VR, may be similar to compute case Eric have implemented, >> need user ctrl through sysfs. >> > > In case of compute, we have auto switching mechanism. when compute > ring is coming, it switches to the default compute profile or user set > profile, and switches back when it's done. So VR should be doing the > same thing with compute. Auto wattman will be disabled when profile > auto switching happens. > > Regards, > Eric > >>            Enter manual dpm mode(driver disable auto wattman), and >> select prefered profile mode, set sclk/mclk range(smu7). >> >>             when enter auto dpm mode, restore default value. >> >> >> >It's possible autowattman will perform ok and we >> >don't need to manually change the profile in the driver, but we'll >> >have to do some profiling to sorhat out. >> >> >> Rex: Idealy, if autowan feature enabled, the proflling mode should be >> adjusted based on workload with  some time delay caused by the work >> queue. >> >> But need some time to verify. >> >> >> Best Regards >> >> Rex >> >> >> >> ------------------------------------------------------------------------ >> *From:* Alex Deucher >> >> *Sent:* Thursday, February 8, 2018 11:28 PM >> *To:* Zhu, Rex >> *Cc:* amd-gfx list >> *Subject:* Re: [PATCH 10/10] drm/amd/pp: Enable auto automan feature >> on Polaris >> On Thu, Feb 8, 2018 at 10:14 AM, Zhu, Rex >> wrote: >> > if user select manual dpm mode,we will disabe autowattman. >> > When switch to auto, we will restart the auto wattman on Polaris, >> > Restore to default profile mode on other ASICS. >> > >> >> But in auto mode, we may want to force a particular profile within the >> driver for a specific use case.  E.g., for VR, we may want to select >> the VR profile when the user sets the priority to high in the context >> ioctl, and then switch it back to autowattman or the default profile >> when the context if freed or the priority is changes.  We may want to >> do something similar for video when the user submits work to the >> multi-media engines.  It's possible autowattman will perform ok and we >> don't need to manually change the profile in the driver, but we'll >> have to do some profiling to sort that out.  I guess it should just be >> a matter of disabling autowattman and switching to a profile when the >> driver needs it and then switching back when it's done. >> >> Alex >> >> > >> > Best Regards >> > Rex >> > ________________________________ >> > From: Alex Deucher >> >> > Sent: Thursday, February 8, 2018 11:02:21 PM >> > To: Zhu, Rex >> > Cc: amd-gfx list >> > Subject: Re: [PATCH 10/10] drm/amd/pp: Enable auto automan feature on >> > Polaris >> > >> > On Thu, Feb 8, 2018 at 4:14 AM, Rex Zhu >> wrote: >> >> Change-Id: I69b24ce65ddb361a89e5ac9b197ae6df9b60a9e5 >> >> Signed-off-by: Rex Zhu >> > >> > Would be good to give a brief description of what autowattman actually >> > does in the patch description.  Also, we may need to manually select a >> > profile in some cases (e.g., VR).  Would that be a problem with >> > autowattman? >> > >> > Alex >> > >> >> --- >> >> drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 4 ++++ >> >>  1 file changed, 4 insertions(+) >> >> >> >> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c >> >> b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c >> >> index f50b6cd..549e830 100644 >> >> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c >> >> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c >> >> @@ -1023,6 +1023,10 @@ int polaris_set_asic_special_caps(struct >> pp_hwmgr >> >> *hwmgr) >> >> phm_cap_set(hwmgr->platform_descriptor.platformCaps, >> >> >> >> PHM_PlatformCaps_TCPRamping); >> >>         } >> >> + >> >> +       if (hwmgr->feature_mask & PP_AUTOWATTMAN_MASK) >> >> + hwmgr->autowattman_enabled = true; /* currently only >> >> enabled on polaris */ >> >> + >> >>         return 0; >> >>  } >> >> >> >> -- >> >> 1.9.1 >> >> >> >> _______________________________________________ >> >> amd-gfx mailing list >> >> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org >> >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx >> amd-gfx Info Page - freedesktop.org >> >> lists.freedesktop.org >> Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the >> following form. Use of all freedesktop.org lists is subject to our >> Code of ... >> >> >> >> >> >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx > --------------61B32BCD4F85128E06808873 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Is the switching automatically by driver or manually by user?


Regards,

Eric


On 2018-02-08 11:54 AM, Zhu, Rex wrote:

>In case of compute, we have auto switching mechanism. when compute ring is coming, it switches to the default compute profile or user set profile, >and switches back when it's done. So VR should be doing the same thing with compute. Auto wattman will be disabled when profile auto switching >happens.


Rex: Ok, the logic is same.

 

when computer ring begins,  set manual dpm mode(pp do nothing except disable auto wattman feature), and set compute profile or  custom profile.

set clock range. and set auto dpm mode, switch back


Best Regards

Rex


 




From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Eric Huang <jinhuieric.huang-5C7GfCeVMHo@public.gmane.org>
Sent: Friday, February 9, 2018 12:47 AM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 10/10] drm/amd/pp: Enable auto automan feature on Polaris
 



On 2018-02-08 11:35 AM, Zhu, Rex wrote:

>But in auto mode, we may want to force a particular profile within the
>driver for a specific use case.  E.g., for VR, we may want to select
>the VR profile when the user sets the priority to high in the context
>ioctl, and then switch it back to autowattman or the default profile
>when the context if freed or the priority is changes.  We may want to
>do something similar for video when the user submits work to the
>multi-media engines. 

>  I guess it should just be
>a matter of disabling autowattman and switching to a profile when the
>driver needs it and then switching back when it's done.


Rex: 

         For MM, we can disable auto wattman (if enabled), and set video profile mode when enable uvd/vce dpm on smu7.

        restore to default when disable uvd/vce dpm when engine idle.

 

         VR, may be similar to compute case Eric have implemented, need user ctrl through sysfs.


In case of compute, we have auto switching mechanism. when compute ring is coming, it switches to the default compute profile or user set profile, and switches back when it's done. So VR should be doing the same thing with compute. Auto wattman will be disabled when profile auto switching happens.

Regards,
Eric
      

           Enter manual dpm mode(driver disable auto wattman), and select prefered profile mode, set sclk/mclk range(smu7).

            when enter auto dpm mode, restore default value. 


>It's possible autowattman will perform ok and we
>don't need to manually change the profile in the driver, but we'll
>have to do some profiling to sorhat out.        


Rex: Idealy, if autowan feature enabled, the proflling mode should be adjusted based on workload with  some time delay caused by the work queue.

But need some time to verify.


Best Regards

Rex


 


From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Sent: Thursday, February 8, 2018 11:28 PM
To: Zhu, Rex
Cc: amd-gfx list
Subject: Re: [PATCH 10/10] drm/amd/pp: Enable auto automan feature on Polaris
 
On Thu, Feb 8, 2018 at 10:14 AM, Zhu, Rex <Rex.Zhu-5C7GfCeVMHo@public.gmane.org> wrote:
> if user select manual dpm mode,we will disabe autowattman.
> When switch to auto, we will restart the auto wattman on Polaris,
> Restore to default profile mode on other ASICS.
>

But in auto mode, we may want to force a particular profile within the
driver for a specific use case.  E.g., for VR, we may want to select
the VR profile when the user sets the priority to high in the context
ioctl, and then switch it back to autowattman or the default profile
when the context if freed or the priority is changes.  We may want to
do something similar for video when the user submits work to the
multi-media engines.  It's possible autowattman will perform ok and we
don't need to manually change the profile in the driver, but we'll
have to do some profiling to sort that out.  I guess it should just be
a matter of disabling autowattman and switching to a profile when the
driver needs it and then switching back when it's done.

Alex

>
> Best Regards
> Rex
> ________________________________
> From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Sent: Thursday, February 8, 2018 11:02:21 PM
> To: Zhu, Rex
> Cc: amd-gfx list
> Subject: Re: [PATCH 10/10] drm/amd/pp: Enable auto automan feature on
> Polaris
>
> On Thu, Feb 8, 2018 at 4:14 AM, Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org> wrote:
>> Change-Id: I69b24ce65ddb361a89e5ac9b197ae6df9b60a9e5
>> Signed-off-by: Rex Zhu <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
>
> Would be good to give a brief description of what autowattman actually
> does in the patch description.  Also, we may need to manually select a
> profile in some cases (e.g., VR).  Would that be a problem with
> autowattman?
>
> Alex
>
>> ---
>>  drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
>> b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
>> index f50b6cd..549e830 100644
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
>> @@ -1023,6 +1023,10 @@ int polaris_set_asic_special_caps(struct pp_hwmgr
>> *hwmgr)
>>                 phm_cap_set(hwmgr->platform_descriptor.platformCaps,
>>
>> PHM_PlatformCaps_TCPRamping);
>>         }
>> +
>> +       if (hwmgr->feature_mask & PP_AUTOWATTMAN_MASK)
>> +               hwmgr->autowattman_enabled = true; /* currently only
>> enabled on polaris */
>> +
>>         return 0;
>>  }
>>
>> --
>> 1.9.1
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...




_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


--------------61B32BCD4F85128E06808873-- --===============0968565655== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KYW1kLWdmeCBt YWlsaW5nIGxpc3QKYW1kLWdmeEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9hbWQtZ2Z4Cg== --===============0968565655==--