return 1;
}
+int intel_dp_link_bw_overhead(int link_clock, int lane_count, int hdisplay,
+ int dsc_slice_count, int bpp_x16, unsigned long flags)
+{
+ int overhead;
+
+ WARN_ON(flags & ~(DRM_DP_BW_OVERHEAD_MST | DRM_DP_BW_OVERHEAD_SSC_REF_CLK |
+ DRM_DP_BW_OVERHEAD_FEC));
+
+ if (drm_dp_is_uhbr_rate(link_clock))
+ flags |= DRM_DP_BW_OVERHEAD_UHBR;
+
+ if (dsc_slice_count)
+ flags |= DRM_DP_BW_OVERHEAD_DSC;
+
+ overhead = drm_dp_bw_overhead(lane_count, hdisplay,
+ dsc_slice_count,
+ bpp_x16,
+ flags);
+
+ /*
+ * TODO: clarify whether a minimum required by the fixed FEC overhead
+ * in the bspec audio programming sequence is required here.
+ */
+ return max(overhead, intel_dp_bw_fec_overhead(flags & DRM_DP_BW_OVERHEAD_FEC));
+}
+
/*
* The required data bandwidth for a mode with given pixel clock and bpp. This
* is the required net bandwidth independent of the data bandwidth efficiency.
bool intel_dp_source_supports_tps3(struct intel_display *display);
bool intel_dp_source_supports_tps4(struct intel_display *display);
+int intel_dp_link_bw_overhead(int link_clock, int lane_count, int hdisplay,
+ int dsc_slice_count, int bpp_x16, unsigned long flags);
int intel_dp_link_required(int pixel_clock, int bpp);
int intel_dp_effective_data_rate(int pixel_clock, int bpp_x16,
int bw_overhead);
const struct drm_display_mode *adjusted_mode =
&crtc_state->hw.adjusted_mode;
unsigned long flags = DRM_DP_BW_OVERHEAD_MST;
- int overhead;
- flags |= intel_dp_is_uhbr(crtc_state) ? DRM_DP_BW_OVERHEAD_UHBR : 0;
flags |= ssc ? DRM_DP_BW_OVERHEAD_SSC_REF_CLK : 0;
flags |= crtc_state->fec_enable ? DRM_DP_BW_OVERHEAD_FEC : 0;
- if (dsc_slice_count)
- flags |= DRM_DP_BW_OVERHEAD_DSC;
-
- overhead = drm_dp_bw_overhead(crtc_state->lane_count,
- adjusted_mode->hdisplay,
- dsc_slice_count,
- bpp_x16,
- flags);
-
- /*
- * TODO: clarify whether a minimum required by the fixed FEC overhead
- * in the bspec audio programming sequence is required here.
- */
- return max(overhead, intel_dp_bw_fec_overhead(crtc_state->fec_enable));
+ return intel_dp_link_bw_overhead(crtc_state->port_clock,
+ crtc_state->lane_count,
+ adjusted_mode->hdisplay,
+ dsc_slice_count,
+ bpp_x16,
+ flags);
}
static void intel_dp_mst_compute_m_n(const struct intel_crtc_state *crtc_state,