[igt-dev] [PATCH i-g-t v2 2/2] tools/vbt_decode: Print PSR2 training pattern duration
Dhinakaran Pandiyan
dhinakaran.pandiyan at intel.com
Fri Jul 19 15:01:31 UTC 2019
There is a new field for PSR2 training pattern duration in VBT versions
>= 226, decode that.
v2: Changed to fixed-width types(Ville)
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.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..3b9006f5 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;
+ uint32_t psr2_tp_time;
/* 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 uint16_t psr2_tp_times[] = {500, 100, 2500, 5};
+
+ index = (psr2_tp_time >> (i * 2)) & 0x3;
+ printf("\t\tPSR2 TP2/TP3 wakeup time: %d usec (0x%x)\n",
+ psr2_tp_times[index], index);
+ }
}
}
--
2.17.1
More information about the igt-dev
mailing list