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: [PATCH 08/13] drm/i915/bios: reserve struct bdb_ prefix for BDB blocks
Date: Fri, 31 May 2019 16:14:58 +0300	[thread overview]
Message-ID: <cd062ced1bbbe07e087212b42c83e5ac64a22a49.1559308269.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1559308269.git.jani.nikula@intel.com>

Don't use bdb_ prefixes for structs within blocks. Add a new bdb struct
for SDVO panel DTDs for completeness.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_bios.c     | 12 ++++++------
 drivers/gpu/drm/i915/intel_vbt_defs.h | 20 ++++++++++++--------
 2 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 81ca94498178..b5aedb605c05 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -302,7 +302,7 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
 		    const struct bdb_header *bdb)
 {
 	const struct bdb_lfp_backlight_data *backlight_data;
-	const struct bdb_lfp_backlight_data_entry *entry;
+	const struct lfp_backlight_data_entry *entry;
 	int panel_type = dev_priv->vbt.panel_type;
 
 	backlight_data = find_section(bdb, BDB_LVDS_BACKLIGHT);
@@ -327,7 +327,7 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
 	dev_priv->vbt.backlight.type = INTEL_BACKLIGHT_DISPLAY_DDI;
 	if (bdb->version >= 191 &&
 	    get_blocksize(backlight_data) >= sizeof(*backlight_data)) {
-		const struct bdb_lfp_backlight_control_method *method;
+		const struct lfp_backlight_control_method *method;
 
 		method = &backlight_data->backlight_control[panel_type];
 		dev_priv->vbt.backlight.type = method->type;
@@ -351,7 +351,7 @@ static void
 parse_sdvo_panel_data(struct drm_i915_private *dev_priv,
 		      const struct bdb_header *bdb)
 {
-	const struct lvds_dvo_timing *dvo_timing;
+	const struct bdb_sdvo_panel_dtds *dtds;
 	struct drm_display_mode *panel_fixed_mode;
 	int index;
 
@@ -371,15 +371,15 @@ parse_sdvo_panel_data(struct drm_i915_private *dev_priv,
 		index = sdvo_lvds_options->panel_type;
 	}
 
-	dvo_timing = find_section(bdb, BDB_SDVO_PANEL_DTDS);
-	if (!dvo_timing)
+	dtds = find_section(bdb, BDB_SDVO_PANEL_DTDS);
+	if (!dtds)
 		return;
 
 	panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
 	if (!panel_fixed_mode)
 		return;
 
-	fill_detail_timing_data(panel_fixed_mode, dvo_timing + index);
+	fill_detail_timing_data(panel_fixed_mode, &dtds->dtds[index]);
 
 	dev_priv->vbt.sdvo_lvds_vbt_mode = panel_fixed_mode;
 
diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
index 3f870ac48840..0566c52b058a 100644
--- a/drivers/gpu/drm/i915/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
@@ -477,7 +477,7 @@ struct bdb_lvds_options {
 } __packed;
 
 /* LFP pointer table contains entries to the struct below */
-struct bdb_lvds_lfp_data_ptr {
+struct lvds_lfp_data_ptr {
 	u16 fp_timing_offset; /* offsets are from start of bdb */
 	u8 fp_table_size;
 	u16 dvo_timing_offset;
@@ -488,7 +488,7 @@ struct bdb_lvds_lfp_data_ptr {
 
 struct bdb_lvds_lfp_data_ptrs {
 	u8 lvds_entries; /* followed by one or more lvds_data_ptr structs */
-	struct bdb_lvds_lfp_data_ptr ptr[16];
+	struct lvds_lfp_data_ptr ptr[16];
 } __packed;
 
 /* LFP data has 3 blocks per entry */
@@ -547,20 +547,24 @@ struct lvds_pnp_id {
 	u8 mfg_year;
 } __packed;
 
-struct bdb_lvds_lfp_data_entry {
+struct lvds_lfp_data_entry {
 	struct lvds_fp_timing fp_timing;
 	struct lvds_dvo_timing dvo_timing;
 	struct lvds_pnp_id pnp_id;
 } __packed;
 
 struct bdb_lvds_lfp_data {
-	struct bdb_lvds_lfp_data_entry data[16];
+	struct lvds_lfp_data_entry data[16];
+} __packed;
+
+struct bdb_sdvo_panel_dtds {
+	struct lvds_dvo_timing dtds[4];
 } __packed;
 
 #define BDB_BACKLIGHT_TYPE_NONE	0
 #define BDB_BACKLIGHT_TYPE_PWM	2
 
-struct bdb_lfp_backlight_data_entry {
+struct lfp_backlight_data_entry {
 	u8 type:2;
 	u8 active_low_pwm:1;
 	u8 obsolete1:5;
@@ -570,16 +574,16 @@ struct bdb_lfp_backlight_data_entry {
 	u8 obsolete3;
 } __packed;
 
-struct bdb_lfp_backlight_control_method {
+struct lfp_backlight_control_method {
 	u8 type:4;
 	u8 controller:4;
 } __packed;
 
 struct bdb_lfp_backlight_data {
 	u8 entry_size;
-	struct bdb_lfp_backlight_data_entry data[16];
+	struct lfp_backlight_data_entry data[16];
 	u8 level[16];
-	struct bdb_lfp_backlight_control_method backlight_control[16];
+	struct lfp_backlight_control_method backlight_control[16];
 } __packed;
 
 struct bdb_sdvo_lvds_options {
-- 
2.20.1

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

  parent reply	other threads:[~2019-05-31 13:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 13:14 [PATCH 00/13] drm/i915/bios: vbt cleanup Jani Nikula
2019-05-31 13:14 ` [PATCH 01/13] drm/i915/bios: make child device order the priority order Jani Nikula
2019-05-31 14:04   ` Ville Syrjälä
2019-06-05 12:22     ` Jani Nikula
2019-05-31 13:14 ` [PATCH 02/13] drm/i915/bios: store child device pointer in DDI port info Jani Nikula
2019-05-31 13:14 ` [PATCH 03/13] drm/i915/bios: refactor DDC pin and AUX CH sanitize functions Jani Nikula
2019-05-31 13:14 ` [PATCH 04/13] drm/i915/bios: use port info child pointer to determine HPD invert Jani Nikula
2019-05-31 13:14 ` [PATCH 05/13] drm/i915/bios: use port info child pointer to determine LSPCON presence Jani Nikula
2019-05-31 13:14 ` [PATCH 06/13] drm/i915/bios: clean up VBT port info debug logging Jani Nikula
2019-05-31 13:14 ` [PATCH 07/13] drm/i915/bios: remove unused, obsolete VBT definitions Jani Nikula
2019-05-31 13:14 ` Jani Nikula [this message]
2019-05-31 13:14 ` [PATCH 09/13] drm/i915/bios: add BDB block comments before definitions Jani Nikula
2019-05-31 13:15 ` [PATCH 10/13] drm/i915/bios: sort BDB block definitions using block ID Jani Nikula
2019-05-31 13:15 ` [PATCH 11/13] drm/i915/bios: add VBT swing bit to child device definition Jani Nikula
2019-05-31 13:15 ` [PATCH 12/13] drm/i915/bios: add more LFP options Jani Nikula
2019-05-31 13:15 ` [PATCH 13/13] drm/i915/bios: add an enum for BDB block IDs Jani Nikula
2019-05-31 16:34 ` ✓ Fi.CI.BAT: success for drm/i915/bios: vbt cleanup Patchwork
2019-06-01 22:03 ` ✓ Fi.CI.IGT: " 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=cd062ced1bbbe07e087212b42c83e5ac64a22a49.1559308269.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.