]> 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)
commit0c556d718aeebad276bb342803e48a2d4b40283b
treef4aef16f80dec5136de32ec9d0893c9587b82647
parent1ad48252a725d1d9f9e2e28f290657fd04479835
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 '88e1ee9e5590 ("drm/i915/cnp:
Ignore VBT request for know invalid DDC pin.")'

Also this properly fixes commit e5b6099082cb ("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: 88e1ee9e5590 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
Fixes: e5b6099082cb ("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