[PATCH i-g-t 09/13] tools/intel_vbt_decode: Add version checks for backlight decoding
Jani Nikula
jani.nikula at intel.com
Thu Apr 11 13:06:32 UTC 2024
On Fri, 22 Mar 2024, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Decode stuff from the backlight block based on the version
> number.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula at intel.com>
> ---
> tools/intel_vbt_decode.c | 39 +++++++++++++++++++++++++--------------
> 1 file changed, 25 insertions(+), 14 deletions(-)
>
> diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
> index fa9c45920853..642cb84a56b6 100644
> --- a/tools/intel_vbt_decode.c
> +++ b/tools/intel_vbt_decode.c
> @@ -650,27 +650,38 @@ static void dump_backlight_info(struct context *context,
> printf("\t\tI2C command: 0x%02x\n", blc->i2c_command);
> }
>
> + if (context->bdb->version < 162)
> + continue;
> +
> printf("\t\tLevel: %u\n", backlight->level[i]);
>
> + if (context->bdb->version < 191)
> + continue;
> +
> control = &backlight->backlight_control[i];
>
> printf("\t\tControl type: %u\n", control->type);
> printf("\t\tController: %u\n", control->controller);
>
> - if (context->bdb->version >= 234) {
> - printf("\t\tBrightness level: %u\n",
> - backlight->brightness_level[i].level);
> - printf("\t\tBrightness min level: %u\n",
> - backlight->brightness_min_level[i].level);
> - }
> -
> - if (context->bdb->version >= 236)
> - printf("\t\tBrigthness precision bits: %u\n",
> - backlight->brightness_precision_bits[i]);
> -
> - if (context->bdb->version >= 239)
> - printf("\t\tHDR DPCD refresh timeout: %.2f ms\n",
> - backlight->hdr_dpcd_refresh_timeout[i] / 100.0);
> + if (context->bdb->version < 234)
> + continue;
> +
> + printf("\t\tBrightness level: %u\n",
> + backlight->brightness_level[i].level);
> + printf("\t\tBrightness min level: %u\n",
> + backlight->brightness_min_level[i].level);
> +
> + if (context->bdb->version < 236)
> + continue;
> +
> + printf("\t\tBrigthness precision bits: %u\n",
> + backlight->brightness_precision_bits[i]);
> +
> + if (context->bdb->version < 239)
> + continue;
> +
> + printf("\t\tHDR DPCD refresh timeout: %.2f ms\n",
> + backlight->hdr_dpcd_refresh_timeout[i] / 100.0);
> }
> }
--
Jani Nikula, Intel
More information about the igt-dev
mailing list