Patch "drm/i915/cnp: Properly handle VBT ddc pin out of bounds." has been added to the 4.15-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-cnp-properly-handle-vbt-ddc-pin-out-of-bounds.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
6e3322c226f15bc1838007f5a75566f1482b8e40Mon Sep 17 00:00:00 2001
From: Rodrigo Vivi <[email protected]>
Date: Thu, 25 Jan 2018 14:25:24 -0800
Subject: drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
From: Rodrigo Vivi <[email protected]>
commit 6e3322c226f15bc1838007f5a75566f1482b8e40 upstream.
If the table result is out of bounds on the array map there is something really wrong with VBT pin so we don't return that vbt_pin, but only return 0 instead.
This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
Ignore VBT request for know invalid DDC pin.")'
Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
Map VBT DDC Pin to BSpec DDC Pin.")
v2: Do in a way that we don't break other platforms. (Jani)
v3: Keep debug message (Jani)
v4: Don't mess with 0 mapping was noticed by Jani and
addressed with a simple solution suggested by Lucas that makes this even simpler.
--- drivers/gpu/drm/i915/intel_bios.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_bios.c +3 -2
@@ -1107,6 +1107,7 @@ static void sanitize_aux_ch(struct drm_i }static const u8 cnp_ddc_pin_map[] = { + [0 ] =0 ,/* N/A */ [DDC_BUS_DDI_B ] =GMBUS_PIN_1_BXT , [DDC_BUS_DDI_C ] =GMBUS_PIN_2_BXT , [DDC_BUS_DDI_D ] =GMBUS_PIN_4_CNP ,/* sic */
@@ -1116,9 +1117,9 @@ static const u8 cnp_ddc_pin_map[] = {static u8 map_ddc_pin (struct drm_i915_private *dev_priv,u8 vbt_pin) {if (HAS_PCH_CNP (dev_priv)) { -if (vbt_pin >0 && vbt_pin <ARRAY_SIZE (cnp_ddc_pin_map)) +if (vbt_pin <ARRAY_SIZE (cnp_ddc_pin_map)) {return cnp_ddc_pin_map[vbt_pin]; -if (vbt_pin >GMBUS_PIN_4_CNP ) { + }else {DRM_DEBUG_KMS ("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n" , vbt_pin);return 0 ; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/drm-i915-cnp-properly-handle-vbt-ddc-pin-out-of-bounds.patch queue-4.15/drm-i915-cnp-ignore-vbt-request-for-know-invalid-ddc-pin.patch