[PATCH i-g-t 09/13] tools/intel_vbt_decode: Add version checks for backlight decoding
Ville Syrjala
ville.syrjala at linux.intel.com
Fri Mar 22 20:41:21 UTC 2024
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>
---
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);
}
}
--
2.43.2
More information about the igt-dev
mailing list