[igt-dev] [PATCH i-g-t 2/2] tooks/vbt_decode: Print PSR2 training pattern durations.
Pandiyan, Dhinakaran
dhinakaran.pandiyan at intel.com
Fri Jul 19 16:38:19 UTC 2019
> -----Original Message-----
> From: Ville Syrjälä [mailto:ville.syrjala at linux.intel.com]
> Sent: Friday, July 19, 2019 9:18 AM
> To: Pandiyan, Dhinakaran <dhinakaran.pandiyan at intel.com>
> Cc: igt-dev at lists.freedesktop.org
> Subject: Re: [igt-dev] [PATCH i-g-t 2/2] tooks/vbt_decode: Print PSR2
> training pattern durations.
>
> 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 at 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.
>
> The field in the VBT has a fixed size, hence the uint32_t. And as for
> the array, I generally just minimize their size.
I was curious about the array specifically, thanks for the reviews.
-DK
>
> --
> Ville Syrjälä
> Intel
More information about the igt-dev
mailing list