drm/dp_mst: Fix PBN divider calculation for UHBR rates
authorImre Deak <imre.deak@intel.com>
Fri, 17 Nov 2023 15:09:27 +0000 (17:09 +0200)
committerImre Deak <imre.deak@intel.com>
Tue, 21 Nov 2023 14:32:44 +0000 (16:32 +0200)
commitd389989ed530b3d8944974b7ee866b089720bc9c
tree071f5bdadcaa3f23e034b101a80ec493a0f71e72
parent191dc43935d1ece82bc6c9653463b3b1cd8198fb
drm/dp_mst: Fix PBN divider calculation for UHBR rates

The current way of calculating the pbn_div value, the link BW per each
MTP slot, worked only for DP 1.4 link rates. Fix things up for UHBR
rates calculating with the correct channel coding efficiency based on
the link rate.

v2:
- Return the fractional pbn_div value from drm_dp_get_vc_payload_bw().
v3:
- Fix rounding up quotient while calculating req_slots. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231117150929.1767227-1-imre.deak@intel.com
drivers/gpu/drm/display/drm_dp_mst_topology.c
include/drm/display/drm_dp_helper.h