aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/intel_dp_mst.c
diff options
context:
space:
mode:
authorImre Deak <[email protected]>2023-11-16 13:18:31 +0000
committerImre Deak <[email protected]>2023-11-21 14:31:58 +0000
commit191dc43935d1ece82bc6c9653463b3b1cd8198fb (patch)
treeb17564c519ce4be7a7b06e0d7320c3df377c68b2 /drivers/gpu/drm/i915/display/intel_dp_mst.c
parentdrm/i915/fbc: Bump ivb FBC max surface size to 4kx4k (diff)
downloadkernel-191dc43935d1ece82bc6c9653463b3b1cd8198fb.tar.gz
kernel-191dc43935d1ece82bc6c9653463b3b1cd8198fb.zip
drm/dp_mst: Store the MST PBN divider value in fixed point format
On UHBR links the PBN divider is a fractional number, accordingly store it in fixed point format. For now drm_dp_get_vc_payload_bw() always returns a whole number and all callers will use only the integer part of it which should preserve the current behavior. The next patch will fix drm_dp_get_vc_payload_bw() for UHBR rates returning a fractional number for those (also accounting for the channel coding efficiency correctly). Cc: Lyude Paul <[email protected]> Cc: Harry Wentland <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Wayne Lin <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Ville Syrjälä <[email protected]> Acked-by: Daniel Vetter <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> [Rebased changes in dm_helpers_construct_old_payload() on drm-intel-next] Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_dp_mst.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_dp_mst.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 0cb9405f59ea..e5d6b811c22e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -26,6 +26,7 @@
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_edid.h>
+#include <drm/drm_fixed.h>
#include <drm/drm_probe_helper.h>
#include "i915_drv.h"
@@ -202,7 +203,7 @@ static int intel_dp_mst_find_vcpi_slots_for_bpp(struct intel_encoder *encoder,
*/
drm_WARN_ON(&i915->drm, remote_m_n.tu < crtc_state->dp_m_n.tu);
crtc_state->dp_m_n.tu = remote_m_n.tu;
- crtc_state->pbn = remote_m_n.tu * mst_state->pbn_div;
+ crtc_state->pbn = remote_m_n.tu * dfixed_trunc(mst_state->pbn_div);
slots = drm_dp_atomic_find_time_slots(state, &intel_dp->mst_mgr,
connector->port,