drm/i915/dp: Ensure sink/link max lane count values are always valid
authorImre Deak <imre.deak@intel.com>
Mon, 18 Oct 2021 09:41:52 +0000 (12:41 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 20 Oct 2021 09:20:21 +0000 (12:20 +0300)
commitbedcaddadd22da82fc2590569ff81a31045176b1
treeffd75dbca3f4a1d6e7d2305cb0bfee6cc868cd2f
parent9ad87de4735620ffc555592e8c5f580478fa3ed0
drm/i915/dp: Ensure sink/link max lane count values are always valid

Print an error if the DPCD sink max lane count is invalid and fix it up.

While at it also add an assert that the link max lane count (derived
from intel_dp_max_common_lane_count(), potentially reduced by the LT
fallback logic) value is also valid.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211018094154.1407705-5-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_dp.c