[PATCH 3/4] drm/i915/dsi: Adjust crtc_clock for burst_mode_ratio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On devices with a burst_mode_ratio which is not 100 (1:1), the pclk
will have a different value then drm_display_mode.clock .

On a Prowise PT301 tablet where vbt.lfp_lvds_vbt_mode.clock is 66100 and
burst_mode_ratio is 130 this leads to the following errors:

[drm:pipe_config_err [i915]] *ERROR* mismatch in
pixel_rate (expected 66100, found 86458)
[drm:pipe_config_err [i915]] *ERROR* mismatch in
base.adjusted_mode.crtc_clock (expected 66100, found 86458)
[drm:pipe_config_err [i915]] *ERROR* mismatch in
port_clock (expected 66100, found 86458)

This commit makes intel_dsi_compute_config() set
pipe_config.adjusted_mode.crtc_clock, taking the burst_mode_ratio into
account fixing this.

Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
 drivers/gpu/drm/i915/vlv_dsi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/vlv_dsi.c b/drivers/gpu/drm/i915/vlv_dsi.c
index c21cbfa9653c..d72ccf557a9c 100644
--- a/drivers/gpu/drm/i915/vlv_dsi.c
+++ b/drivers/gpu/drm/i915/vlv_dsi.c
@@ -347,6 +347,10 @@ static bool intel_dsi_compute_config(struct intel_encoder *encoder,
 			return false;
 	}
 
+	adjusted_mode->crtc_clock =
+		DIV_ROUND_UP(adjusted_mode->crtc_clock *
+					 intel_dsi->burst_mode_ratio, 100);
+
 	pipe_config->clock_set = true;
 
 	return true;
-- 
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux