]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/i915/dp: Sanitize intel_dp_get_link_train_fallback_values()
authorImre Deak <imre.deak@intel.com>
Mon, 10 Jun 2024 16:49:16 +0000 (19:49 +0300)
committerImre Deak <imre.deak@intel.com>
Thu, 13 Jun 2024 18:26:49 +0000 (21:26 +0300)
commit9eb4aab86a87e4bd65530dd90a97f45ba13a368a
tree8a09c01513ec61028e619eb94c98d861044b0ea8
parentdd1eae474e4e93c4076997a749d744fa01396a01
drm/i915/dp: Sanitize intel_dp_get_link_train_fallback_values()

Reduce the indentation in intel_dp_get_link_train_fallback_values() by
adding separate helpers to reduce the link rate and lane count. Also
simplify things by passing crtc_state to the function.

This also prepares for later patches in the patchset adding a limitation
on how the link params are reduced.

While at it use lt_dbg()/lt_err() for debug/error prints in the function
which will also print the connector/encoder prefix and add a debug print
about reducing the link parameters.

v2:
- Align reduce_lane_count()'s error handling flow with
  reduce_link_rate(). (Ville, Jani)
- Use lt_dbg()/lt_err() in the function.

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