Re: [PATCH] drm/i915/psr : Add psr1 live status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2018-05-23 at 11:07 +0530, Nagaraju, Vathsala wrote:
> 
> On 5/23/2018 1:28 AM, Dhinakaran Pandiyan wrote:
> > 
> > On Tue, 2018-05-22 at 14:27 +0530, vathsala nagaraju wrote:
> > > 
> > > From: Vathsala Nagaraju <vathsala.nagaraju@xxxxxxxxx>
> > > 
> > > Prints live state of psr1.Extending the existing
> > > PSR2 live state function to cover psr1.
> > > 
> > > Tested on KBL with psr2 and psr1 panel.
> > > 
> > > v2: rebase
> > > v3: DK
> > >      Rename psr2_live_status to psr_source_status
> > > 
> > > Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
> > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx>
> > > 
> > > Signed-off-by: Vathsala Nagaraju <vathsala.nagaraju@xxxxxxxxx>
> > > ---
> > >   drivers/gpu/drm/i915/i915_debugfs.c | 66
> > > +++++++++++++++++++++++--
> > > ------------
> > >   drivers/gpu/drm/i915/i915_reg.h     |  1 +
> > >   2 files changed, 43 insertions(+), 24 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c
> > > b/drivers/gpu/drm/i915/i915_debugfs.c
> > > index 5251544..e4a2f15 100644
> > > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > > @@ -2596,25 +2596,42 @@ static int
> > > i915_guc_log_relay_release(struct
> > > inode *inode, struct file *file)
> > >   	.release = i915_guc_log_relay_release,
> > >   };
> > >   
> > > -static const char *psr2_live_status(u32 val)
> > > -{
> > > -	static const char * const live_status[] = {
> > > -		"IDLE",
> > > -		"CAPTURE",
> > > -		"CAPTURE_FS",
> > > -		"SLEEP",
> > > -		"BUFON_FW",
> > > -		"ML_UP",
> > > -		"SU_STANDBY",
> > > -		"FAST_SLEEP",
> > > -		"DEEP_SLEEP",
> > > -		"BUF_ON",
> > > -		"TG_ON"
> > > -	};
> > > -
> > > -	val = (val & EDP_PSR2_STATUS_STATE_MASK) >>
> > > EDP_PSR2_STATUS_STATE_SHIFT;
> > > -	if (val < ARRAY_SIZE(live_status))
> > > -		return live_status[val];
> > > +static const char *psr_source_status(u32 val, bool
> > > is_psr2_enabled)
> > Please change this to psr_source_status(drm_i915_private *dev_priv)
> to print in format , source psr status %x [%s] , where %x = complete
> psr 
> source register value(0x6f940) , %s = psr_status_bits [31 :28/29].
> if we want handle everything as part of psr_source_status() , then
> we 
> need to return register value in some pointer.
> if not then we read the  reg and then pass it to psr_source_status
> which 
> returns live status string.

Pass struct seq_file *m to psr_source_status() and print the status
there.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux