DP DSC needs to use sink parameters, not theoretical model size
Currently drm_dsc_compute_rc_parameters
computes the parameters using the theoretical model size. This is not right. It should be using the actual model size acquired from the panel. For example DSC 1.2a section D.3 states:
The required rate buffer model size for a specific configuration is provided by a formula in Annex E (minRateBufferSize); however, implementations may require a larger or smaller physical buffer than the buffer model due to slice multiplexing, blanking, substream multiplexing, intermediate buffering, or other factors.
In the case of DP, this needs to be based on DPCD DP_DSC_RC_BUF_BLK_SIZE
and DP_DSC_RC_BUF_SIZE
. In the case of DSI, i915 should get this from VBT. The solution for the core DSC helpers needs to be agnostic to driver and sink.