From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhu, Rex" Subject: RE: [PATCH] drm/amdgpu: show gfx clock gating status to user Date: Thu, 5 Jan 2017 04:27:39 +0000 Message-ID: References: <1483440426-22080-1-git-send-email-ray.huang@amd.com> <20170104022144.GA21218@hr-amur2> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0057352920==" Return-path: 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: "Huang, Ray" , "Deucher, Alexander" Cc: "Fu, Ping" , "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org" , "Mao, David" --===============0057352920== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CY4PR12MB1687087F6B8A456F9599F834FB600CY4PR12MB1687namp_" --_000_CY4PR12MB1687087F6B8A456F9599F834FB600CY4PR12MB1687namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Sorry, update. User just need to know the cg/pg feature's state(enable/disable), not curre= nt CG state. Best Regards Rex -----Original Message----- From: Zhu, Rex Sent: Thursday, January 05, 2017 11:34 AM To: Huang, Ray; Deucher, Alexander Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; Mao, David; Fu, Ping Subject: RE: [PATCH] drm/amdgpu: show gfx clock gating status to user As talked with David. They not only need to know whether the CG/PG is suppo= rted, but also need to know those features state(enabled/disabled) (not cu= rrent CG/PG state). we added the profile mode, so in runtime, user can disable/enable cg. Then user wanted to confirm the feature's state So we may need to export cg/pg mask and feature's state. Best Regards Rex -----Original Message----- From: Huang Rui [mailto:ray.huang-5C7GfCeVMHo@public.gmane.org] Sent: Wednesday, January 04, 2017 10:22 AM To: Deucher, Alexander Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; Zh= u, Rex; Mao, David; Fu, Ping Subject: Re: [PATCH] drm/amdgpu: show gfx clock gating status to user On Tue, Jan 03, 2017 at 11:02:09PM +0800, Deucher, Alexander wrote: > > -----Original Message----- > > From: Huang Rui [mailto:ray.huang-5C7GfCeVMHo@public.gmane.org] > > Sent: Tuesday, January 03, 2017 5:47 AM > > To: Deucher, Alexander; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > > Cc: Zhu, Rex; Mao, David; Fu, Ping; Huang, Ray > > Subject: [PATCH] drm/amdgpu: show gfx clock gating status to user > > > > Signed-off-by: Huang Rui > > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + > > drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 5 +++++ > > drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 2 ++ > > drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 ++ > > drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 +++ > > 5 files changed, 13 insertions(+) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > index 96eeea7..989d311 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > @@ -1033,6 +1033,7 @@ struct amdgpu_gfx { > > struct amdgpu_irq_src priv_inst_irq; > > /* gfx status */ > > uint32_t gfx_current_status; > > + bool cg_enabled; > > /* ce ram size*/ > > unsigned ce_ram_size; > > struct amdgpu_cu_info cu_info; > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c > > index a7c7657..10f2eab 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c > > @@ -1543,6 +1543,11 @@ static int amdgpu_debugfs_pm_info(struct > > seq_file *m, void *data) > > struct amdgpu_device *adev =3D dev->dev_private; > > struct drm_device *ddev =3D adev->ddev; > > > > + if (adev->gfx.cg_enabled) > > + seq_printf(m, "GFX Clock Gating: Enabled\n"); > > + else > > + seq_printf(m, "GFX Clock Gating: Disabled\n"); > > + > > > I think it would be better to print the cg_flags and pg_flags (both as a = mask and in human readable form) so we know exactly cg and pg features are = enabled. > It's probable better. Let me revise this patch and send it later. Thanks, Rui --_000_CY4PR12MB1687087F6B8A456F9599F834FB600CY4PR12MB1687namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Sorry, update.

User just need to know the c= g/pg features state(enable/disable), not = current CG state.

 

Best Regards

Rex

 

-----Original Message----- From: Zhu, Rex
Sent: Thursday, January 05, 2017 11:34 AM
To: Huang, Ray; Deucher, Alexander
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; Mao, David; Fu, Ping
Subject: RE: [PATCH] drm/amdgpu: show gfx clock gating status to user

 

As talked with David. They n= ot only need to know whether the CG/PG is supported, but also need to know =  those features state(enabled/disabled) (not current CG/PG state).

 

we added the profile mode, s= o in runtime, user can disable/enable cg.

Then user wanted to confirm = the features state

 

So we may need to export cg/= pg mask and features state.

 

Best Regards

Rex

 

 

-----Original Message-----

From: Huang Rui [mailto:ray.huang-5C7GfCeVMHo@public.gmane.org]

Sent: Wednesday, January 04,= 2017 10:22 AM

To: Deucher, Alexander<= /o:p>

Cc: amd-gfx-PD4FTy7X32mqWrfYKbYh0A@public.gmane.org= ktop.org; Zhu, Rex; Mao, David; Fu, Ping

Subject: Re: [PATCH] drm/amd= gpu: show gfx clock gating status to user

 

On Tue, Jan 03, 2017 at 11:0= 2:09PM +0800, Deucher, Alexander wrote:

> > -----Original Mess= age-----

> > From: Huang Rui [<= a href=3D"mailto:ray.huang-5C7GfCeVMHo@public.gmane.org">mailto:ray.huang-5C7GfCeVMHo@public.gmane.org]

> > Sent: Tuesday, Jan= uary 03, 2017 5:47 AM

> > To: Deucher, Alexa= nder; amd-gfx-PD4FTy7X32mqWrfYKbYh0A@public.gmane.org= ktop.org

> > Cc: Zhu, Rex; Mao,= David; Fu, Ping; Huang, Ray

> > Subject: [PATCH] d= rm/amdgpu: show gfx clock gating status to user

> > =

> > Signed-off-by: Hua= ng Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>

> > ---

> >  drivers/gpu/= drm/amd/amdgpu/amdgpu.h    | 1 +

> >  drivers/gpu/= drm/amd/amdgpu/amdgpu_pm.c | 5 +++++

> > drivers/gpu/drm/am= d/amdgpu/gfx_v6_0.c  | 2 ++

> > drivers/gpu/drm/am= d/amdgpu/gfx_v7_0.c  | 2 ++

> > drivers/gpu/drm/am= d/amdgpu/gfx_v8_0.c  | 3 +++

> >  5 files chan= ged, 13 insertions(+)

> > =

> > diff --git a/drive= rs/gpu/drm/amd/amdgpu/amdgpu.h

> > b/drivers/gpu/drm/= amd/amdgpu/amdgpu.h

> > index 96eeea7..989= d311 100644

> > --- a/drivers/gpu/= drm/amd/amdgpu/amdgpu.h

> > +++ b/= drivers/gpu/drm/amd/amdgpu/amdgpu.h

> > @@ -1033,6 +10= 33,7 @@ struct amdgpu_gfx {

> >    =       struct amdgpu_irq_src    = ;          priv_inst_irq;=

> >    =       /* gfx status */

> >    =       uint32_t      =             &nb= sp;  gfx_current_status;

> > +  &= nbsp;       bool     = ;            &n= bsp;           cg_enabled= ;

> >    =       /* ce ram size*/

> >    =       unsigned      =             &nb= sp;  ce_ram_size;

> >    =       struct amdgpu_cu_info    = ;         cu_info;

> > diff --git a/drive= rs/gpu/drm/amd/amdgpu/amdgpu_pm.c

> > b/drivers/gpu/drm/= amd/amdgpu/amdgpu_pm.c

> > index a7c7657..10f= 2eab 100644

> > --- a/drivers/gpu/= drm/amd/amdgpu/amdgpu_pm.c

> > +++ b/= drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

> > @@ -1543,6 +15= 43,11 @@ static int amdgpu_debugfs_pm_info(struct

> > seq_file *m, void = *data)

> >    =       struct amdgpu_device *adev =3D dev->dev_p= rivate;

> >    =       struct drm_device *ddev =3D adev->ddev;

> > =

> > +  &= nbsp;       if (adev->gfx.cg_enabled)=

> > +  &= nbsp;           &nbs= p;    seq_printf(m, "GFX Clock Gating: Enabled\n")= ;

> > +  &= nbsp;       else

> > +  &= nbsp;           &nbs= p;    seq_printf(m, "GFX Clock Gating: Disabled\n"= );

> > +

>

>

> I think it would be bet= ter to print the cg_flags and pg_flags (both as a mask and in human readabl= e form) so we know exactly cg and pg features are enabled.

>

 

It's probable better. Let me= revise this patch and send it later.

 

Thanks,

Rui

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