[igt-dev] [PATCH i-g-t 1/2] tools/intel_vbt_decode: dump backlight data for all panels
Ser, Simon
simon.ser at intel.com
Fri Aug 23 13:35:18 UTC 2019
On Fri, 2019-08-23 at 15:29 +0300, Jani Nikula wrote:
> Similar to other panel type indexed arrays.
>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
Looks good to me.
Reviewed-by: Simon Ser <simon.ser at intel.com>
> ---
> tools/intel_vbt_decode.c | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
> index 3b9006f55313..25399d33b8db 100644
> --- a/tools/intel_vbt_decode.c
> +++ b/tools/intel_vbt_decode.c
> @@ -229,6 +229,7 @@ static void dump_backlight_info(struct context *context,
> {
> const struct bdb_lfp_backlight_data *backlight = block->data;
> const struct lfp_backlight_data_entry *blc;
> + int i;
>
> if (sizeof(*blc) != backlight->entry_size) {
> printf("\tBacklight struct sizes don't match (expected %zu, got %u), skipping\n",
> @@ -236,12 +237,21 @@ static void dump_backlight_info(struct context *context,
> return;
> }
>
> - blc = &backlight->data[context->panel_type];
> + for (i = 0; i < ARRAY_SIZE(backlight->data); i++) {
> + if (i != context->panel_type && !context->dump_all_panel_types)
> + continue;
> +
> + printf("\tPanel %d%s\n", i,
> + context->panel_type == i ? " *" : "");
> +
> + blc = &backlight->data[i];
> +
> + printf("\t\tInverter type: %u\n", blc->type);
> + printf("\t\tActive low: %u\n", blc->active_low_pwm);
> + printf("\t\tPWM freq: %u\n", blc->pwm_freq_hz);
> + printf("\t\tMinimum brightness: %u\n", blc->min_brightness);
> + }
>
> - printf("\tInverter type: %d\n", blc->type);
> - printf("\t polarity: %d\n", blc->active_low_pwm);
> - printf("\t PWM freq: %d\n", blc->pwm_freq_hz);
> - printf("\tMinimum brightness: %d\n", blc->min_brightness);
> }
>
> static const struct {
More information about the igt-dev
mailing list