public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 2/2] tooks/vbt_decode: Print PSR2 training pattern durations.
Date: Fri, 19 Jul 2019 11:18:06 -0700	[thread overview]
Message-ID: <c2370d1ab71e1057876dd6088e247a080cc852e7.camel@intel.com> (raw)
In-Reply-To: <20190719161550.GO5942@intel.com>

On Fri, 2019-07-19 at 19:15 +0300, Ville Syrjälä wrote:
> On Fri, Jul 19, 2019 at 08:12:07AM -0700, Dhinakaran Pandiyan wrote:
> > On Thu, 2019-07-18 at 14:35 +0300, Ville Syrjälä wrote:
> > > On Wed, Jul 17, 2019 at 05:43:31PM -0700, Dhinakaran Pandiyan wrote:
> > > > There is a new field for PSR2 training pattern duration in VBT versions
> > > > > = 226, decode that.
> > > > 
> > > > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > > ---
> > > >  tools/intel_vbt_decode.c | 11 +++++++++++
> > > >  1 file changed, 11 insertions(+)
> > > > 
> > > > diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
> > > > index 38eccc48..4004762c 100644
> > > > --- a/tools/intel_vbt_decode.c
> > > > +++ b/tools/intel_vbt_decode.c
> > > > @@ -944,11 +944,13 @@ static void dump_psr(struct context *context,
> > > >  {
> > > >  	const struct bdb_psr *psr_block = block->data;
> > > >  	int i;
> > > > +	int psr2_tp_time;
> > > 
> > > uint32_t
> > > 
> > > >  
> > > >  	/* The same block ID was used for something else before? */
> > > >  	if (context->bdb->version < 165)
> > > >  		return;
> > > >  
> > > > +	psr2_tp_time = psr_block->psr2_tp2_tp3_wakeup_time;
> > > >  	for (i = 0; i < 16; i++) {
> > > >  		const struct psr_table *psr = &psr_block->psr_table[i];
> > > >  
> > > > @@ -987,6 +989,15 @@ static void dump_psr(struct context *context,
> > > >  		printf("\t\tTP2/TP3 wakeup time: %d usec (0x%x)\n",
> > > >  		       psr->tp2_tp3_wakeup_time * 100,
> > > >  		       psr->tp2_tp3_wakeup_time);
> > > > +
> > > > +		if (context->bdb->version >= 226) {
> > > > +			int index;
> > > > +			static const int psr2_tp_times[] = {500, 100, 2500, 5};
> > > 
> > > Everthing fits into uint16_t.
> > 
> > Do we want a fixed-width type for values that are not read from/written to HW?
> > I changed it in the second version anyway. 
> > > 
> > > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Oh, and the psr1 parsing doesn't seem to be following this silly
> > > new style of putting the hw register value directly into the vbt.
> > > Would be nice to fix that too. Actually, since the spec is a mess
> > > and it's not 100% clear which VBTs might follow which style maybe
> > > we should in fact decode both ways?
> > 
> > I thought of fixing it, but left it alone because it is a mess as you said.
> > Are suggesting something like this - "TP2/TP3 wakeup time: 200 usec/2500 usec (0x02)"?
> 
> Yeah something like that, but with maybe a bit more verbosity to explain
> the two values.
> 
> > I feel the ambiguity makes decoding useless as it requires someone to go read
> > the driver code to know what will get programmed. Might as well avoid decoding and
> > just print the raw value. The other option is to replicate the platform checks used in
> > the driver.
> 
> I don't think we have platform infomation beyond what the
> signature + version gives us. And IIRC all SKL derivatives
> use the  "$VBT SKYLAKE" signature so we can't actually tell
> those apart. So I guess we'd just have to decode based on
> the version number for all those.
> 
> But maybe we can tell BXT apart from the rest based on the
> signature?
> 
> So we could do:
> if !BXT && v >= 205
> 	new deocde
> else
> 	old decode

I like this better. Got a BXT to see what the signature actually looks like, "$VBT BROXTON" it is.

-DK
> 

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-07-19 18:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18  0:43 [igt-dev] [PATCH i-g-t 1/2] tools/vbt_decode: Fix VBT parsing for the PSR section Dhinakaran Pandiyan
2019-07-18  0:43 ` [igt-dev] [PATCH i-g-t 2/2] tooks/vbt_decode: Print PSR2 training pattern durations Dhinakaran Pandiyan
2019-07-18 11:35   ` Ville Syrjälä
2019-07-19 15:12     ` Dhinakaran Pandiyan
2019-07-19 16:15       ` Ville Syrjälä
2019-07-19 18:18         ` Dhinakaran Pandiyan [this message]
2019-07-19 16:18       ` Ville Syrjälä
2019-07-19 16:38         ` Pandiyan, Dhinakaran
2019-07-19 15:01   ` [igt-dev] [PATCH i-g-t v2 2/2] tools/vbt_decode: Print PSR2 training pattern duration Dhinakaran Pandiyan
2019-07-18  1:58 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tools/vbt_decode: Fix VBT parsing for the PSR section Patchwork
2019-07-18  7:36 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-07-18 11:30 ` [igt-dev] [PATCH i-g-t 1/2] " Ville Syrjälä
2019-07-19 16:16 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tools/vbt_decode: Fix VBT parsing for the PSR section (rev2) Patchwork
2019-07-19 22:06 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=c2370d1ab71e1057876dd6088e247a080cc852e7.camel@intel.com \
    --to=dhinakaran.pandiyan@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.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