diff mbox series

[SRU,linux-oem,v2,13/16] drm/i915/bios: split up iboost to hdmi and dp bitfields

Message ID 20180131060944.30357-14-kai.heng.feng@canonical.com
State New
Headers show
Series Fix out of bound VBT pin on CNP | expand

Commit Message

Kai-Heng Feng Jan. 31, 2018, 6:09 a.m. UTC
From: Jani Nikula <jani.nikula@intel.com>

BugLink: https://bugs.launchpad.net/bugs/1746411

This is according to the style all over the place. No functional
changes.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/cf5f0e5d10851db3796e632836d23551f59cc412.1503670197.git.jani.nikula@intel.com
(cherry picked from commit f22bb35856ba1e115dea21b0effb050945838ffb)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/gpu/drm/i915/intel_bios.c     | 4 ++--
 drivers/gpu/drm/i915/intel_vbt_defs.h | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 04453aaa49a8..02be3b01a31f 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1233,10 +1233,10 @@  static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
 
 	/* Parse the I_boost config for SKL and above */
 	if (bdb->version >= 196 && child->iboost) {
-		info->dp_boost_level = translate_iboost(child->iboost_level & 0xF);
+		info->dp_boost_level = translate_iboost(child->dp_iboost_level);
 		DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
 			      port_name(port), info->dp_boost_level);
-		info->hdmi_boost_level = translate_iboost(child->iboost_level >> 4);
+		info->hdmi_boost_level = translate_iboost(child->hdmi_iboost_level);
 		DRM_DEBUG_KMS("VBT HDMI boost level for port %c: %d\n",
 			      port_name(port), info->hdmi_boost_level);
 	}
diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
index 826f5f830f54..b5630337c041 100644
--- a/drivers/gpu/drm/i915/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
@@ -397,7 +397,8 @@  struct child_device_config {
 	u8 flags2;						/* 195 */
 	u8 dp_gpio_index;					/* 195 */
 	u16 dp_gpio_pin_num;					/* 195 */
-	u8 iboost_level;
+	u8 dp_iboost_level:4;					/* 196 */
+	u8 hdmi_iboost_level:4;					/* 196 */
 } __packed;
 
 struct bdb_general_definitions {