]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 25 Jan 2018 22:25:24 +0000 (14:25 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 29 Jan 2018 22:11:56 +0000 (14:11 -0800)
commitd99c416d6bfa94a66e738d0e0fb83a61258e8468
treef4aef16f80dec5136de32ec9d0893c9587b82647
parent2a534e56eac4dbfe9415460643599253e2ee5869
drm/i915/cnp: Properly handle VBT ddc pin out of bounds.

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 'f3446270b73e ("drm/i915/cnp:
Ignore VBT request for know invalid DDC pin.")'

Also this properly fixes commit 143f85f95e2d ("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.

Fixes: f3446270b73e ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
Fixes: 143f85f95e2d ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180125222524.22059-1-rodrigo.vivi@intel.com
drivers/gpu/drm/i915/intel_bios.c