From: Jani Nikula <jani.nikula@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [igt-dev] [PATCH i-g-t 1/2] tools/intel_vbt_decode: dump backlight data for all panels
Date: Fri, 23 Aug 2019 15:29:11 +0300 [thread overview]
Message-ID: <20190823122912.28180-1-jani.nikula@intel.com> (raw)
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
next reply other threads:[~2019-08-23 12:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-23 12:29 Jani Nikula [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190823122912.28180-1-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox