]> git.baikalelectronics.ru Git - kernel.git/commit
drm/display: Don't assume dual mode adaptors support i2c sub-addressing
authorSimon Rettberg <simon.rettberg@rz.uni-freiburg.de>
Thu, 6 Oct 2022 09:33:14 +0000 (11:33 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 15 Nov 2022 21:31:02 +0000 (23:31 +0200)
commit6dfa575f7e9099fae1b9c9303ace3c5acc6bcfca
treebea3ed152625a6f9fd55a39ab1f65c2b6c87c3b1
parent0746624de8e25f1032e055e0d82cac644ff47fc7
drm/display: Don't assume dual mode adaptors support i2c sub-addressing

Current dual mode adaptor ("DP++") detection code assumes that all
adaptors support i2c sub-addressing for read operations from the
DP-HDMI adaptor ID buffer.  It has been observed that multiple
adaptors do not in fact support this, and always return data starting
at register 0.  On affected adaptors, the code fails to read the proper
registers that would identify the device as a type 2 adaptor, and
handles those as type 1, limiting the TMDS clock to 165MHz, even if
the according register would announce a higher TMDS clock.
Fix this by always reading the ID buffer starting from offset 0, and
discarding any bytes before the actual offset of interest.

We tried finding authoritative documentation on whether or not this is
allowed behaviour, but since all the official VESA docs are paywalled,
the best we could come up with was the spec sheet for Texas Instruments'
SNx5DP149 chip family.[1]  It explicitly mentions that sub-addressing is
supported for register writes, but *not* for reads (See NOTE in
section 8.5.3).  Unless TI openly decided to violate the VESA spec, one
could take that as a hint that sub-addressing is in fact not mandated
by VESA.
The other two adaptors affected used the PS8409(A) and the LT8611,
according to the data returned from their ID buffers.

[1] https://www.ti.com/lit/ds/symlink/sn75dp149.pdf

Cc: stable@vger.kernel.org
Signed-off-by: Simon Rettberg <simon.rettberg@rz.uni-freiburg.de>
Reviewed-by: Rafael Gieschke <rafael.gieschke@rz.uni-freiburg.de>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221006113314.41101987@computer
Acked-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/display/drm_dp_dual_mode_helper.c