aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2018-01-18 10:33:10 -0500
committerRodrigo Vivi <rodrigo.vivi@intel.com>2018-02-07 15:32:14 -0500
commit6dd3104e78943685d5183efe883d83a5f2361bf1 (patch)
tree2e762c4774bc50679b5a03043aebb0f686dc0c7c
parent6e3322c226f15bc1838007f5a75566f1482b8e40 (diff)
drm/i915/bios: add DP max link rate to VBT child device struct
Update VBT defs to reflect revision 216. While at it, default the expected child device struct size to sizeof the size rather than a hardcoded value. v2: Fix bit order (David) Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180118153310.32437-1-jani.nikula@intel.com (cherry picked from commit c4fb60b9aba9f939d3f8575df23fd8d5958ec6ed) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r--drivers/gpu/drm/i915/intel_bios.c8
-rw-r--r--drivers/gpu/drm/i915/intel_vbt_defs.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 4c42cc4b193b..f7f771749e48 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1329,11 +1329,13 @@ parse_general_definitions(struct drm_i915_private *dev_priv,
1329 expected_size = LEGACY_CHILD_DEVICE_CONFIG_SIZE; 1329 expected_size = LEGACY_CHILD_DEVICE_CONFIG_SIZE;
1330 } else if (bdb->version == 195) { 1330 } else if (bdb->version == 195) {
1331 expected_size = 37; 1331 expected_size = 37;
1332 } else if (bdb->version <= 197) { 1332 } else if (bdb->version <= 215) {
1333 expected_size = 38; 1333 expected_size = 38;
1334 } else if (bdb->version <= 216) {
1335 expected_size = 39;
1334 } else { 1336 } else {
1335 expected_size = 38; 1337 expected_size = sizeof(*child);
1336 BUILD_BUG_ON(sizeof(*child) < 38); 1338 BUILD_BUG_ON(sizeof(*child) < 39);
1337 DRM_DEBUG_DRIVER("Expected child device config size for VBT version %u not known; assuming %u\n", 1339 DRM_DEBUG_DRIVER("Expected child device config size for VBT version %u not known; assuming %u\n",
1338 bdb->version, expected_size); 1340 bdb->version, expected_size);
1339 } 1341 }
diff --git a/drivers/gpu/drm/i915/intel_vbt_defs.h b/drivers/gpu/drm/i915/intel_vbt_defs.h
index e3d7745a9151..98dff6058d3c 100644
--- a/drivers/gpu/drm/i915/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/intel_vbt_defs.h
@@ -412,6 +412,8 @@ struct child_device_config {
412 u16 dp_gpio_pin_num; /* 195 */ 412 u16 dp_gpio_pin_num; /* 195 */
413 u8 dp_iboost_level:4; /* 196 */ 413 u8 dp_iboost_level:4; /* 196 */
414 u8 hdmi_iboost_level:4; /* 196 */ 414 u8 hdmi_iboost_level:4; /* 196 */
415 u8 dp_max_link_rate:2; /* 216 CNL+ */
416 u8 dp_max_link_rate_reserved:6; /* 216 */
415} __packed; 417} __packed;
416 418
417struct bdb_general_definitions { 419struct bdb_general_definitions {