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 08/10] tools/intel_vbt_decode: migrate edp dumping to kernel struct
Date: Mon, 28 Aug 2017 15:20:00 +0300	[thread overview]
Message-ID: <aaeb0e81872600691d8d11a4dfec052403911f2c.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>

No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tools/intel_bios.h       | 33 ---------------------------------
 tools/intel_vbt_decode.c |  7 ++++---
 tools/intel_vbt_defs.h   | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/tools/intel_bios.h b/tools/intel_bios.h
index f4b0b9795221..9f0bc84f372c 100644
--- a/tools/intel_bios.h
+++ b/tools/intel_bios.h
@@ -130,39 +130,6 @@ struct edp_power_seq {
 	uint16_t t12;
 } __attribute__ ((packed));
 
-struct edp_fast_link_params {
-	uint8_t rate:4;
-	uint8_t lanes:4;
-	uint8_t preemphasis:4;
-	uint8_t vswing:4;
-} __attribute__ ((packed));
-
-struct edp_pwm_delays {
-	uint16_t pwm_on_to_backlight_enable;
-	uint16_t backlight_disable_to_pwm_off;
-} __attribute__ ((packed));
-
-struct edp_full_link_params {
-	uint8_t preemphasis:4;
-	uint8_t vswing:4;
-} __attribute__ ((packed));
-
-struct bdb_edp { /* 155 */
-	struct edp_power_seq power_seqs[16];
-	uint32_t color_depth;
-	struct edp_fast_link_params fast_link_params[16];
-	uint32_t sdrrs_msa_timing_delay;
-
-	uint16_t s3d_feature; /* 163 */
-	uint16_t t3_optimization; /* 165 */
-	uint64_t vswing_preemph_table_selection; /* 173 */
-	uint16_t fast_link_training; /* 182 */
-	uint16_t dpcd_600h_write_required; /* 185 */
-	struct edp_pwm_delays pwm_delays[16]; /* 186 */
-	uint16_t full_link_params_provided; /* 199 */
-	struct edp_full_link_params full_link_params[16]; /* 199 */
-} __attribute__ ((packed));
-
 /* Block 52 contains MiPi Panel info
  * 6 such enteries will there. Index into correct
  * entery is based on the panel_index in #40 LFP
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index d0b91a3de3ef..ed0b90bd63e6 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -44,6 +44,7 @@
 typedef uint8_t u8;
 typedef uint16_t u16;
 typedef uint32_t u32;
+typedef uint64_t u64;
 #define __packed __attribute__ ((packed))
 
 #define _INTEL_BIOS_PRIVATE
@@ -797,17 +798,17 @@ static void dump_edp(struct context *context,
 		}
 
 		if (context->bdb->version >= 162) {
-			bool val = (edp->s3d_feature >> i) & 1;
+			bool val = (edp->edp_s3d_feature >> i) & 1;
 			printf("\t\tStereo 3D feature: %s\n", YESNO(val));
 		}
 
 		if (context->bdb->version >= 165) {
-			bool val = (edp->t3_optimization >> i) & 1;
+			bool val = (edp->edp_t3_optimization >> i) & 1;
 			printf("\t\tT3 optimization: %s\n", YESNO(val));
 		}
 
 		if (context->bdb->version >= 173) {
-			int val = (edp->vswing_preemph_table_selection >> (i * 4)) & 0xf;
+			int val = (edp->edp_vswing_preemph >> (i * 4)) & 0xf;
 
 			printf("\t\tVswing/preemphasis table selection: ");
 			switch (val) {
diff --git a/tools/intel_vbt_defs.h b/tools/intel_vbt_defs.h
index a43ec2d1c02e..9513f9dc21ab 100644
--- a/tools/intel_vbt_defs.h
+++ b/tools/intel_vbt_defs.h
@@ -671,6 +671,41 @@ struct bdb_driver_features {
 #define EDP_VSWING_0_8V		2
 #define EDP_VSWING_1_2V		3
 
+
+struct edp_fast_link_params {
+	u8 rate:4;
+	u8 lanes:4;
+	u8 preemphasis:4;
+	u8 vswing:4;
+} __packed;
+
+struct edp_pwm_delays {
+	u16 pwm_on_to_backlight_enable;
+	u16 backlight_disable_to_pwm_off;
+} __packed;
+
+struct edp_full_link_params {
+	u8 preemphasis:4;
+	u8 vswing:4;
+} __packed;
+
+struct bdb_edp {
+	struct edp_power_seq power_seqs[16];
+	u32 color_depth;
+	struct edp_fast_link_params fast_link_params[16];
+	u32 sdrrs_msa_timing_delay;
+
+	/* ith bit indicates enabled/disabled for (i+1)th panel */
+	u16 edp_s3d_feature;					/* 162 */
+	u16 edp_t3_optimization;				/* 165 */
+	u64 edp_vswing_preemph;					/* 173 */
+	u16 fast_link_training;					/* 182 */
+	u16 dpcd_600h_write_required;				/* 185 */
+	struct edp_pwm_delays pwm_delays[16];			/* 186 */
+	u16 full_link_params_provided;				/* 199 */
+	struct edp_full_link_params full_link_params[16];	/* 199 */
+} __packed;
+
 struct psr_table {
 	/* Feature bits */
 	u8 full_link:1;
-- 
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 ` Jani Nikula [this message]
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 ` [i-g-t PATCH 10/10] tools/intel_vbt_defs: migrate backlight dumping to kernel struct Jani Nikula
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=aaeb0e81872600691d8d11a4dfec052403911f2c.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.