Skip to content

Commit 4dfce79

Browse files
vsyrjalajlahtine-intel
authored andcommitted
drm/i915/dsi: Don't do DSC horizontal timing adjustments in command mode
Stop adjusting the horizontal timing values based on the compression ratio in command mode. Bspec seems to be telling us to do this only in video mode, and this is also how the Windows driver does things. This should also fix a div-by-zero on some machines because the adjusted htotal ends up being so small that we end up with line_time_us==0 when trying to determine the vtotal value in command mode. Note that this doesn't actually make the display on the Huawei Matebook E work, but at least the kernel no longer explodes when the driver loads. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12045 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260326111814.9800-2-ville.syrjala@linux.intel.com Fixes: 53693f0 ("drm/i915/dsi: account for DSC in horizontal timings") Reviewed-by: Jani Nikula <jani.nikula@intel.com> (cherry picked from commit 0b475e91ecc2313207196c6d7fd5c53e1a878525) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
1 parent 7aaa804 commit 4dfce79

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/i915/display/icl_dsi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ gen11_dsi_set_transcoder_timings(struct intel_encoder *encoder,
889889
* non-compressed link speeds, and simplifies down to the ratio between
890890
* compressed and non-compressed bpp.
891891
*/
892-
if (crtc_state->dsc.compression_enable) {
892+
if (is_vid_mode(intel_dsi) && crtc_state->dsc.compression_enable) {
893893
mul = fxp_q4_to_int(crtc_state->dsc.compressed_bpp_x16);
894894
div = mipi_dsi_pixel_format_to_bpp(intel_dsi->pixel_format);
895895
}
@@ -1503,7 +1503,7 @@ static void gen11_dsi_get_timings(struct intel_encoder *encoder,
15031503
struct drm_display_mode *adjusted_mode =
15041504
&pipe_config->hw.adjusted_mode;
15051505

1506-
if (pipe_config->dsc.compressed_bpp_x16) {
1506+
if (is_vid_mode(intel_dsi) && pipe_config->dsc.compressed_bpp_x16) {
15071507
int div = fxp_q4_to_int(pipe_config->dsc.compressed_bpp_x16);
15081508
int mul = mipi_dsi_pixel_format_to_bpp(intel_dsi->pixel_format);
15091509

0 commit comments

Comments
 (0)