]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/i915/dsi: fix VBT send packet port selection for ICL+
authorJani Nikula <jani.nikula@intel.com>
Fri, 20 May 2022 09:46:00 +0000 (12:46 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 10 Aug 2022 07:25:20 +0000 (09:25 +0200)
commitbef8fe5095d7b7a826755c9e7b4bdc332f4986d0
treee158b76740b0fbece6ad14a54b82c240a24c9ae9
parent0a9d28cbe995bbb62ba592305353956626bf4de8
drm/i915/dsi: fix VBT send packet port selection for ICL+

BugLink: https://bugs.launchpad.net/bugs/1981864
commit 0ea917819d12fed41ea4662cc26ffa0060a5c354 upstream.

The VBT send packet port selection was never updated for ICL+ where the
2nd link is on port B instead of port C as in VLV+ DSI.

First, single link DSI needs to use the configured port instead of
relying on the VBT sequence block port. Remove the hard-coded port C
check here and make it generic. For reference, see commit f915084edc5a
("drm/i915: Changes related to the sequence port no for") for the
original VLV specific fix.

Second, the sequence block port number is either 0 or 1, where 1
indicates the 2nd link. Remove the hard-coded port C here for 2nd
link. (This could be a "find second set bit" on DSI ports, but just
check the two possible options.)

Third, sanity check the result with a warning to avoid a NULL pointer
dereference.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5984
Cc: stable@vger.kernel.org # v4.19+
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220520094600.2066945-1-jani.nikula@intel.com
(cherry picked from commit 08c59dde71b73a0ac94e3ed2d431345b01f20485)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/i915/display/intel_dsi_vbt.c