Commit a8e6f388 authored by Rodrigo Vivi's avatar Rodrigo Vivi

drm/i915/cnp: Ignore VBT request for know invalid DDC pin.

Let's ignore VBT request if the pin is clearly wrong.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104139
Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180123174050.4261-1-rodrigo.vivi@intel.comReviewed-by: default avatarRadhakrishna Sripada <radhakrishna.sripada@intel.com>
parent bb5db7e1
...@@ -1115,9 +1115,14 @@ static const u8 cnp_ddc_pin_map[] = { ...@@ -1115,9 +1115,14 @@ static const u8 cnp_ddc_pin_map[] = {
static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin) static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
{ {
if (HAS_PCH_CNP(dev_priv) && if (HAS_PCH_CNP(dev_priv)) {
vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
return cnp_ddc_pin_map[vbt_pin]; return cnp_ddc_pin_map[vbt_pin];
if (vbt_pin > GMBUS_PIN_4_CNP) {
DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
return 0;
}
}
return vbt_pin; return vbt_pin;
} }
......
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