All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhu, Rex" <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
To: "Huang, Ray" <Ray.Huang-5C7GfCeVMHo@public.gmane.org>,
	"Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>
Cc: "Fu, Ping" <Ping.Fu-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"Mao, David" <David.Mao-5C7GfCeVMHo@public.gmane.org>
Subject: RE: [PATCH] drm/amdgpu: show gfx clock gating status to user
Date: Thu, 5 Jan 2017 03:33:30 +0000	[thread overview]
Message-ID: <CY4PR12MB16874CDA4D402175D60E8918FB600@CY4PR12MB1687.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20170104022144.GA21218@hr-amur2>

As talked with David. They not only need to know whether the CG/PG is supported, but also need to 
know current CG/PG state. 

we added the profile mode, so in runtime, user can disable/enable cg. 
Then user wanted to confirm current cg state.

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

Best Regards
Rex


-----Original Message-----
From: Huang Rui [mailto:ray.huang@amd.com] 
Sent: Wednesday, January 04, 2017 10:22 AM
To: Deucher, Alexander
Cc: amd-gfx@lists.freedesktop.org; Zhu, 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@amd.com]
> > Sent: Tuesday, January 03, 2017 5:47 AM
> > To: Deucher, Alexander; amd-gfx@lists.freedesktop.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 <ray.huang@amd.com>
> > ---
> >  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 = dev->dev_private;
> >  	struct drm_device *ddev = 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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-01-05  3:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 10:47 [PATCH] drm/amdgpu: show gfx clock gating status to user Huang Rui
     [not found] ` <1483440426-22080-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2017-01-03 15:02   ` Deucher, Alexander
     [not found]     ` <BN6PR12MB1652A908E7D3DAD0302D6217F76E0-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-04  2:21       ` Huang Rui
2017-01-04  6:52         ` Huang Rui
2017-01-04 17:39           ` Alex Deucher
2017-01-05  3:33         ` Zhu, Rex [this message]
2017-01-05  4:27         ` Zhu, Rex

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=CY4PR12MB16874CDA4D402175D60E8918FB600@CY4PR12MB1687.namprd12.prod.outlook.com \
    --to=rex.zhu-5c7gfcevmho@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=David.Mao-5C7GfCeVMHo@public.gmane.org \
    --cc=Ping.Fu-5C7GfCeVMHo@public.gmane.org \
    --cc=Ray.Huang-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.