public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] tools/intel_vbt_decode: dump backlight data for all panels
@ 2019-08-23 12:29 Jani Nikula
  2019-08-23 12:29 ` [igt-dev] [PATCH i-g-t 2/2] tools/intel_vbt_decode: dump all backlight data Jani Nikula
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jani Nikula @ 2019-08-23 12:29 UTC (permalink / raw)
  To: igt-dev; +Cc: jani.nikula

Similar to other panel type indexed arrays.

Signed-off-by: Jani Nikula <jani.nikula@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 {
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-08-24  9:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-23 12:29 [igt-dev] [PATCH i-g-t 1/2] tools/intel_vbt_decode: dump backlight data for all panels Jani Nikula
2019-08-23 12:29 ` [igt-dev] [PATCH i-g-t 2/2] tools/intel_vbt_decode: dump all backlight data Jani Nikula
2019-08-23 13:37   ` Ser, Simon
2019-08-23 14:27   ` Ville Syrjälä
2019-08-23 13:16 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tools/intel_vbt_decode: dump backlight data for all panels Patchwork
2019-08-23 13:35 ` [igt-dev] [PATCH i-g-t 1/2] " Ser, Simon
2019-08-23 13:43   ` Jani Nikula
2019-08-24  9:30 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox