drm/i915/dp: take LTTPR into account in 128b/132b rates
authorJani Nikula <jani.nikula@intel.com>
Thu, 7 Oct 2021 10:57:27 +0000 (13:57 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 8 Oct 2021 09:44:50 +0000 (12:44 +0300)
commitc474420ba412280bc49888c3ce224f0c650c0dcb
treee75caf6087b61c1ba2c768da847e09169759903b
parent71af6bae771a6ac60e634b6afe00e8ffc5514ad4
drm/i915/dp: take LTTPR into account in 128b/132b rates

Limit the supported UHBR rates based on the repeater support, if there
are repeaters.

This should be done in DP helper level, but that requires an overhaul of
the LTTPR handling, as the max rate is not enough to represent how
128b/132b rates may be masked along the way.

Curiously, the spec says:

* Shall be cleared to 00h when operating in 8b/10b Link Layer.

* Each LTTPR on the way back to the DPTX shall clear the bits that do
  not correspond to the LTTPR's current bit rate.

It's rather vague if we can reliably use the field at this time due to
the wording "operating" and "current". But it would seem bizarre to have
to wait until trying to operate a 128b/132b link layer at a certain bit
rate to figure this out.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211007105727.18439-1-jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_dp.c