drm/msm/sde: detect ppdone timeouts and issue ctl reset

Add mechanism to detect pingpong done irq timeouts and report
back to CRTC that errors occurred. On reception of a max count
report panel dead event to the CRTC, which currently logs it.
If panic is enabled, ppdone timeout will trigger a register dump
and panic, if panic is not enabled, we try to recover by issuing
a CTL reset before the next kickoff.

CRs-Fixed: 2005394
Change-Id: I375c18da40754b879829df50c28ed56e4775cb38
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_display.h b/drivers/gpu/drm/msm/dsi-staging/dsi_display.h
index 563c525..642ea40 100644
--- a/drivers/gpu/drm/msm/dsi-staging/dsi_display.h
+++ b/drivers/gpu/drm/msm/dsi-staging/dsi_display.h
@@ -391,4 +391,19 @@
 int dsi_dispaly_static_frame(struct dsi_display *display, bool enable);
 
 int dsi_display_set_backlight(void *display, u32 bl_lvl);
+
+/**
+ * dsi_display_soft_reset() - perform a soft reset on DSI controller
+ * @display:         Handle to display
+ *
+ * The video, command and controller engines will be disabled before the
+ * reset is triggered. After, the engines will be re-enabled to the same state
+ * as before the reset.
+ *
+ * If the reset is done while MDP timing engine is turned on, the video
+ * engine should be re-enabled only during the vertical blanking time.
+ *
+ * Return: error code
+ */
+int dsi_display_soft_reset(void *display);
 #endif /* _DSI_DISPLAY_H_ */