public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>,
	igt-dev@lists.freedesktop.org
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] tools/vbt_decode: Update PSR1 training pattern decode
Date: Wed, 31 Jul 2019 16:10:22 +0300	[thread overview]
Message-ID: <87zhkumjsx.fsf@intel.com> (raw)
In-Reply-To: <20190720013735.11953-1-dhinakaran.pandiyan@intel.com>

On Fri, 19 Jul 2019, Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> wrote:
> The bit field corresponding to PSR1 training patterns used to be
> platform agnostic. But, for VBT versions above 205 on gen9+, the values
> map to hardware supported duration. The only exception being BXT, which
> follows the legacy mapping.
>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  tools/intel_vbt_decode.c | 37 ++++++++++++++++++++++++++++++-------
>  1 file changed, 30 insertions(+), 7 deletions(-)
>
> diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
> index 3b9006f5..ea64eee2 100644
> --- a/tools/intel_vbt_decode.c
> +++ b/tools/intel_vbt_decode.c
> @@ -945,14 +945,20 @@ static void dump_psr(struct context *context,
>  	const struct bdb_psr *psr_block = block->data;
>  	int i;
>  	uint32_t psr2_tp_time;
> +	const char *bxt_str = "$VBT_BROXTON";

I don't think you can trust that. IS_BROXTON(context->devid) might be
more reliable. *shrug*.

BR,
Jani.


> +	bool is_bxt;
>  
>  	/* The same block ID was used for something else before? */
>  	if (context->bdb->version < 165)
>  		return;
>  
> +	is_bxt = !strncmp((char *)context->vbt->signature, bxt_str,
> +			  strlen(bxt_str));
>  	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];
> +		static const uint16_t psr1_tp_times[] = {500, 100, 2500, 0};
>  
>  		if (i != context->panel_type && !context->dump_all_panel_types)
>  			continue;
> @@ -979,16 +985,33 @@ static void dump_psr(struct context *context,
>  			break;
>  		}
>  
> -		printf("\t\tIdle frames to for PSR enable: %d\n",
> +		printf("\t\tIdle frames to wait for PSR enable: %d\n",
>  		       psr->idle_frames);
>  
> -		printf("\t\tTP1 wakeup time: %d usec (0x%x)\n",
> -		       psr->tp1_wakeup_time * 100,
> -		       psr->tp1_wakeup_time);
>  
> -		printf("\t\tTP2/TP3 wakeup time: %d usec (0x%x)\n",
> -		       psr->tp2_tp3_wakeup_time * 100,
> -		       psr->tp2_tp3_wakeup_time);
> +		if (is_bxt || context->bdb->version < 205)
> +			printf("\t\tTP1 wakeup time: %d usec (0x%x)\n",
> +			       psr->tp1_wakeup_time * 100,
> +			       psr->tp1_wakeup_time);
> +		else if (psr->tp1_wakeup_time <= 2)
> +			printf("\t\tTP1 wakeup time: %d usec (0x%x)\n",
> +			       psr1_tp_times[psr->tp1_wakeup_time],
> +			       psr->tp1_wakeup_time);
> +		else
> +			printf("\t\tTP1 wakeup time invalid (0x%x)",
> +			       psr->tp1_wakeup_time);
> +
> +		if (is_bxt || context->bdb->version < 205)
> +			printf("\t\tTP2/TP3 wakeup time: %d usec (0x%x)\n",
> +			       psr->tp2_tp3_wakeup_time * 100,
> +			       psr->tp2_tp3_wakeup_time);
> +		else if (psr->tp2_tp3_wakeup_time <= 2)
> +			printf("\t\tTP2/TP3 wakeup time: %d usec (0x%x)\n",
> +			       psr1_tp_times[psr->tp2_tp3_wakeup_time],
> +			       psr->tp2_tp3_wakeup_time);
> +		else
> +			printf("\t\tTP2/3 wakeup time invalid (0x%x)",
> +			       psr->tp2_tp3_wakeup_time);
>  
>  		if (context->bdb->version >= 226) {
>  			int index;

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

      parent reply	other threads:[~2019-07-31 13:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-20  1:37 [igt-dev] [PATCH i-g-t 1/2] tools/vbt_decode: Update PSR1 training pattern decode Dhinakaran Pandiyan
2019-07-20  1:37 ` [igt-dev] [PATCH i-g-t 2/2] tools/vbt_decode: Fix PSR2 decoded training pattern duration Dhinakaran Pandiyan
2019-07-20  3:14 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] tools/vbt_decode: Update PSR1 training pattern decode Patchwork
2019-07-29 23:50 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tools/vbt_decode: Update PSR1 training pattern decode (rev2) Patchwork
2019-07-30  9:41 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-07-31 13:10 ` Jani Nikula [this message]

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=87zhkumjsx.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=igt-dev@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox