msm: add idle hint for connectors
Merge idle hint changes into android-msm-pixel-4.19:
a51f6ca3 drm/msm: add idle hint for connectors
b4b641a6 drm/msm/dsi-staging: handle idle hints only if display is
on
5cb08f6d drm/msm/dsi-staging: fix power check in idle hints
0258e862 drm/msm: dsi-staging: allow unsetting idle mode
Fix conflicts:
msm/dsi/dsi_panel_switch.c
msm/sde/sde_encoder.c
Bug: 129355653
Bug: 133462066
Bug: 129355653
Bug: 139685237
Bug: 142222472
Test: follow these steps:
1. cd /sys/devices/platform/soc/soc:qcom,dsi-display-primary
2. echo @60 > idle_mode
3. forcing SF at 90Hz and check /d/*/switch/mode changed
between 60Hz and 90Hz
Change-Id: Idc866ef3f7df2a1e31d6887ef6dd59ff3c0f0bf1
Signed-off-by: Ken Huang <kenbshuang@google.com>
diff --git a/msm/sde/sde_connector.h b/msm/sde/sde_connector.h
index d147713..ec70f56 100644
--- a/msm/sde/sde_connector.h
+++ b/msm/sde/sde_connector.h
@@ -329,6 +329,13 @@
*/
int (*prepare_commit)(void *display,
struct msm_display_conn_params *params);
+
+ /**
+ * set_idle_hint - gives hint to display whether display is idle
+ * @display: Pointer to private display handle
+ * @is_idle: true if display is idle, false otherwise
+ */
+ void (*set_idle_hint)(void *display, bool is_idle);
};
/**
@@ -954,6 +961,14 @@
*/
int sde_connector_get_panel_vfp(struct drm_connector *connector,
struct drm_display_mode *mode);
+
+/**
+ * sde_connector_set_idle_hint - helper to give idle hint to connector
+ * @connector: pointer to drm connector
+ * @is_idle: true on idle, false on wake up from idle
+ */
+void sde_connector_set_idle_hint(struct drm_connector *connector, bool is_idle);
+
/**
* sde_connector_esd_status - helper function to check te status
* @connector: Pointer to DRM connector object