[igt-dev] [PATCH i-g-t 3/3] tools/intel_vbt_decode: Dump the GPIO value/config/flag as a raw hex byte

Jani Nikula jani.nikula at linux.intel.com
Fri Mar 8 19:27:48 UTC 2019


On Fri, 08 Mar 2019, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> The spec is totally confused when it comes to the GPIO flags byte.
> To allow us to inspect that the decoded result at least seems
> sensible let's also dump the raw byte. Should at least show if
> some bits are set which we're not expecting.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula at intel.com>

and pushed to igt

> ---
>  tools/intel_vbt_decode.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
> index 5742081ea29a..857b017b41dd 100644
> --- a/tools/intel_vbt_decode.c
> +++ b/tools/intel_vbt_decode.c
> @@ -1190,14 +1190,14 @@ static const uint8_t *mipi_dump_gpio(const uint8_t *data, uint8_t seq_version)
>  		number = *data++;
>  		flags = *data++;
>  
> -		printf("\t\tGPIO index %u, number %u, set %d\n",
> -		       index, number, flags & 1);
> +		printf("\t\tGPIO index %u, number %u, set %d (0x%02x)\n",
> +		       index, number, flags & 1, flags);
>  	} else {
>  		index = *data++;
>  		flags = *data++;
>  
> -		printf("\t\tGPIO index %u, source %d, set %d\n",
> -		       index, (flags >> 1) & 3, flags & 1);
> +		printf("\t\tGPIO index %u, source %d, set %d (0x%02x)\n",
> +		       index, (flags >> 1) & 3, flags & 1, flags);
>  	}
>  
>  	return data;

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the igt-dev mailing list