Commit 4e27bd50 authored by Shubhangi Shrivastava's avatar Shubhangi Shrivastava Committed by Jani Nikula

drm/i915: Update VBT fields for child devices

This patch adds new fields that are not yet added in drm code
in child devices struct
Signed-off-by: default avatarSivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: default avatarDurgadoss R <durgadoss.r@intel.com>
Signed-off-by: default avatarShubhangi Shrivastava <shubhangi.shrivastava@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1459420907-11383-1-git-send-email-shubhangi.shrivastava@intel.com
parent 5fd9f523
...@@ -1123,7 +1123,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port, ...@@ -1123,7 +1123,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
} }
/* Parse the I_boost config for SKL and above */ /* Parse the I_boost config for SKL and above */
if (bdb->version >= 196 && (child->common.flags_1 & IBOOST_ENABLE)) { if (bdb->version >= 196 && child->common.iboost) {
info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF); info->dp_boost_level = translate_iboost(child->common.iboost_level & 0xF);
DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n", DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n",
port_name(port), info->dp_boost_level); port_name(port), info->dp_boost_level);
...@@ -1241,6 +1241,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv, ...@@ -1241,6 +1241,19 @@ parse_device_mapping(struct drm_i915_private *dev_priv,
*/ */
memcpy(child_dev_ptr, p_child, memcpy(child_dev_ptr, p_child,
min_t(size_t, p_defs->child_dev_size, sizeof(*p_child))); min_t(size_t, p_defs->child_dev_size, sizeof(*p_child)));
/*
* copied full block, now init values when they are not
* available in current version
*/
if (bdb->version < 196) {
/* Set default values for bits added from v196 */
child_dev_ptr->common.iboost = 0;
child_dev_ptr->common.hpd_invert = 0;
}
if (bdb->version < 192)
child_dev_ptr->common.lspcon = 0;
} }
return; return;
} }
......
...@@ -261,9 +261,6 @@ struct old_child_dev_config { ...@@ -261,9 +261,6 @@ struct old_child_dev_config {
* versions. Notice that the meaning of the contents contents may still change, * versions. Notice that the meaning of the contents contents may still change,
* but at least the offsets are consistent. */ * but at least the offsets are consistent. */
/* Definitions for flags_1 */
#define IBOOST_ENABLE (1<<3)
struct common_child_dev_config { struct common_child_dev_config {
u16 handle; u16 handle;
u16 device_type; u16 device_type;
...@@ -272,9 +269,18 @@ struct common_child_dev_config { ...@@ -272,9 +269,18 @@ struct common_child_dev_config {
u8 not_common2[2]; u8 not_common2[2];
u8 ddc_pin; u8 ddc_pin;
u16 edid_ptr; u16 edid_ptr;
u8 obsolete; u8 dvo_cfg; /* See DEVICE_CFG_* above */
u8 flags_1; u8 efp_routed:1;
u8 not_common3[13]; u8 lane_reversal:1;
u8 lspcon:1;
u8 iboost:1;
u8 hpd_invert:1;
u8 flag_reserved:3;
u8 hdmi_support:1;
u8 dp_support:1;
u8 tmds_support:1;
u8 support_reserved:5;
u8 not_common3[12];
u8 iboost_level; u8 iboost_level;
} __packed; } __packed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment