@@ -568,13 +568,28 @@ static void intel_dsi_enable_nop(struct intel_encoder *encoder)
static void intel_dsi_pre_disable(struct intel_encoder *encoder)
{
+ struct drm_device *dev = encoder->base.dev;
struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
+ struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
+ int pipe = intel_crtc->pipe;
+
enum port port;
DRM_DEBUG_KMS("\n");
intel_panel_disable_backlight(intel_dsi->attached_connector);
+ if (is_cmd_mode(intel_dsi)) {
+ drm_vblank_off(dev, pipe);
+
+ /*
+ * Make sure that the last frame is sent otherwise pipe can get
+ * stuck. Currently providing delay time for ~2 vblanks
+ * assuming 60fps.
+ */
+ mdelay(40);
+ }
+
if (is_vid_mode(intel_dsi)) {
/* Send Shutdown command to the panel in LP mode */
for_each_dsi_port(port, intel_dsi->ports)