浏览代码

disp: msm: sde: update crtc check in drm_check_dpms

In cases of adb shell stop, connector->state->crtc is
not updated which prevents panel power down
notification to be sent. In such cases updated crtc
from old connector state.

Change-Id: I94f9e5ad469d771cc673123b4e0cc65ea8f4653e
Signed-off-by: Raviteja Tamatam <[email protected]>
Signed-off-by: Narendra Muppalla <[email protected]>
Raviteja Tamatam 5 年之前
父节点
当前提交
66d9e1e9ab
共有 1 个文件被更改,包括 9 次插入4 次删除
  1. 9 4
      msm/sde/sde_kms.c

+ 9 - 4
msm/sde/sde_kms.c

@@ -974,16 +974,18 @@ static void _sde_kms_drm_check_dpms(struct drm_atomic_state *old_state,
 	struct drm_connector *connector;
 	struct drm_connector *connector;
 	struct drm_connector_state *old_conn_state;
 	struct drm_connector_state *old_conn_state;
 	struct drm_crtc_state *old_crtc_state;
 	struct drm_crtc_state *old_crtc_state;
+	struct drm_crtc *crtc;
 	int i, old_mode, new_mode, old_fps, new_fps;
 	int i, old_mode, new_mode, old_fps, new_fps;
 
 
 	for_each_old_connector_in_state(old_state, connector,
 	for_each_old_connector_in_state(old_state, connector,
 			old_conn_state, i) {
 			old_conn_state, i) {
-		if (!connector->state->crtc)
+		crtc = connector->state->crtc ? connector->state->crtc :
+			old_conn_state->crtc;
+		if (!crtc)
 			continue;
 			continue;
 
 
-		new_fps = connector->state->crtc->state->mode.vrefresh;
-		new_mode = _sde_kms_get_blank(connector->state->crtc->state,
-						connector->state);
+		new_fps = crtc->state->mode.vrefresh;
+		new_mode = _sde_kms_get_blank(crtc->state, connector->state);
 		if (old_conn_state->crtc) {
 		if (old_conn_state->crtc) {
 			old_crtc_state = drm_atomic_get_existing_crtc_state(
 			old_crtc_state = drm_atomic_get_existing_crtc_state(
 					old_state, old_conn_state->crtc);
 					old_state, old_conn_state->crtc);
@@ -999,6 +1001,9 @@ static void _sde_kms_drm_check_dpms(struct drm_atomic_state *old_state,
 		if ((old_mode != new_mode) || (old_fps != new_fps)) {
 		if ((old_mode != new_mode) || (old_fps != new_fps)) {
 			struct drm_panel_notifier notifier_data;
 			struct drm_panel_notifier notifier_data;
 
 
+			SDE_EVT32(old_mode, new_mode, old_fps, new_fps,
+				connector->panel, crtc->state->active,
+				old_conn_state->crtc, event);
 			pr_debug("change detected (power mode %d->%d, fps %d->%d)\n",
 			pr_debug("change detected (power mode %d->%d, fps %d->%d)\n",
 				old_mode, new_mode, old_fps, new_fps);
 				old_mode, new_mode, old_fps, new_fps);