diff options
author | Imre Deak <imre.deak@intel.com> | 2023-11-17 17:09:27 +0200 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2023-11-21 16:32:44 +0200 |
commit | d389989ed530b3d8944974b7ee866b089720bc9c (patch) | |
tree | 071f5bdadcaa3f23e034b101a80ec493a0f71e72 /include | |
parent | 191dc43935d1ece82bc6c9653463b3b1cd8198fb (diff) | |
download | linux-stable-d389989ed530b3d8944974b7ee866b089720bc9c.tar.gz linux-stable-d389989ed530b3d8944974b7ee866b089720bc9c.tar.bz2 linux-stable-d389989ed530b3d8944974b7ee866b089720bc9c.zip |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/display/drm_dp_helper.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h index 194715083399..b88cc53425e0 100644 --- a/include/drm/display/drm_dp_helper.h +++ b/include/drm/display/drm_dp_helper.h @@ -252,6 +252,19 @@ drm_edp_backlight_supported(const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE]) return !!(edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP); } +/** + * drm_dp_is_uhbr_rate - Determine if a link rate is UHBR + * @link_rate: link rate in 10kbits/s units + * + * Determine if the provided link rate is an UHBR rate. + * + * Returns: %True if @link_rate is an UHBR rate. + */ +static inline bool drm_dp_is_uhbr_rate(int link_rate) +{ + return link_rate >= 1000000; +} + /* * DisplayPort AUX channel */ |