All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [i-g-t PATCH 10/10] tools/intel_vbt_defs: migrate backlight dumping to kernel struct
Date: Mon, 28 Aug 2017 15:20:02 +0300	[thread overview]
Message-ID: <04ecde14641eced751fde5f7b1210393de41f05f.1503922610.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1503922610.git.jani.nikula@intel.com>
In-Reply-To: <cover.1503922610.git.jani.nikula@intel.com>

Drop obsolete field dumping.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tools/intel_bios.h       | 16 ----------------
 tools/intel_vbt_decode.c | 20 ++++++++------------
 2 files changed, 8 insertions(+), 28 deletions(-)

diff --git a/tools/intel_bios.h b/tools/intel_bios.h
index 85aa38e085be..4e06ef74e459 100644
--- a/tools/intel_bios.h
+++ b/tools/intel_bios.h
@@ -83,22 +83,6 @@ struct bdb_child_devices {
 	struct legacy_child_device_config children[DEVICE_CHILD_SIZE];
 } __attribute__ ((packed));
 
-struct blc_struct {
-	uint8_t inverter_type:2;
-	uint8_t inverter_polarity:1;	/* 1 means inverted (0 = max brightness) */
-	uint8_t gpio_pins:3;
-	uint8_t gmbus_speed:2;
-	uint16_t pwm_freq;	/* in Hz */
-	uint8_t min_brightness;	/* (0-255) */
-	uint8_t i2c_slave_addr;
-	uint8_t i2c_cmd;
-} __attribute__ ((packed));
-
-struct bdb_lvds_backlight {
-	uint8_t blcstruct_size;
-	struct blc_struct panels[16];
-} __attribute__ ((packed));
-
 #define BDB_DRIVER_NO_LVDS	0
 #define BDB_DRIVER_INT_LVDS	1
 #define BDB_DRIVER_SDVO_LVDS	2
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index d8ca0ee87198..3535459d3353 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -225,25 +225,21 @@ static void dump_general_features(struct context *context,
 static void dump_backlight_info(struct context *context,
 				const struct bdb_block *block)
 {
-	const struct bdb_lvds_backlight *backlight = block->data;
-	const struct blc_struct *blc;
+	const struct bdb_lfp_backlight_data *backlight = block->data;
+	const struct bdb_lfp_backlight_data_entry *blc;
 
-	if (sizeof(struct blc_struct) != backlight->blcstruct_size) {
+	if (sizeof(*blc) != backlight->entry_size) {
 		printf("\tBacklight struct sizes don't match (expected %zu, got %u), skipping\n",
-		     sizeof(struct blc_struct), backlight->blcstruct_size);
+		     sizeof(*blc), backlight->entry_size);
 		return;
 	}
 
-	blc = &backlight->panels[context->panel_type];
+	blc = &backlight->data[context->panel_type];
 
-	printf("\tInverter type: %d\n", blc->inverter_type);
-	printf("\t     polarity: %d\n", blc->inverter_polarity);
-	printf("\t    GPIO pins: %d\n", blc->gpio_pins);
-	printf("\t  GMBUS speed: %d\n", blc->gmbus_speed);
-	printf("\t     PWM freq: %d\n", blc->pwm_freq);
+	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);
-	printf("\tI2C slave addr: 0x%02x\n", blc->i2c_slave_addr);
-	printf("\tI2C command: 0x%02x\n", blc->i2c_cmd);
 }
 
 static const struct {
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-08-28 12:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 12:19 [i-g-t PATCH 00/10] tools/intel_vbt_decode: switch to using kernel intel_vbt_defs.h Jani Nikula
2017-08-28 12:19 ` [i-g-t PATCH 01/10] tools/intel_lid: use local register definition Jani Nikula
2017-08-28 12:19 ` [i-g-t PATCH 02/10] tools/intel_vbt_decode: remove unused definitions from intel_bios.h Jani Nikula
2017-08-28 12:19 ` [i-g-t PATCH 03/10] tools/intel_vbt_decode: clean up struct lvds_dvo_timing Jani Nikula
2017-08-28 12:19 ` [i-g-t PATCH 04/10] tools/intel_vbt_decode: start migrating to kernel intel_vbt_defs.h Jani Nikula
2017-08-28 12:19 ` [i-g-t PATCH 05/10] tools/intel_vbt_decode: migrate timing dumping to kernel struct Jani Nikula
2017-08-28 12:19 ` [i-g-t PATCH 06/10] tools/intel_vbt_decode: migrate child device " Jani Nikula
2017-08-28 12:19 ` [i-g-t PATCH 07/10] tools/intel_vbt_decode: migrate psr " Jani Nikula
2017-08-28 12:20 ` [i-g-t PATCH 08/10] tools/intel_vbt_decode: migrate edp " Jani Nikula
2017-08-28 12:20 ` [i-g-t PATCH 09/10] tools/intel_vbt_decode: migrate child device type bits decoding to kernel defs Jani Nikula
2017-08-28 12:20 ` Jani Nikula [this message]
2017-08-28 12:46 ` ✓ Fi.CI.BAT: success for tools/intel_vbt_decode: switch to using kernel intel_vbt_defs.h Patchwork
2017-08-28 15:25 ` ✓ Fi.CI.IGT: " Patchwork
2017-08-28 22:19 ` [i-g-t PATCH 00/10] " Daniel Vetter
2017-08-29 14:31   ` Jani Nikula

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=04ecde14641eced751fde5f7b1210393de41f05f.1503922610.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.