Ver Fonte

disp: msm: sde: reset bl_scale_sv in power off case

In userspace, the backlight scale of LTM will be set to the maximum value
in the suspend case. However, sometimes this value is sent to the driver
after resume. This will cause a backlight flicker issue.
For fix this issue, this change resets the backlight scale in the suspend case.

Change-Id: I0eb586eeefbf3444d6f44281d58789460300dffc
Signed-off-by: Yuchao Ma <[email protected]>
Yuchao Ma há 2 anos atrás
pai
commit
dd47950072
1 ficheiros alterados com 7 adições e 1 exclusões
  1. 7 1
      msm/sde/sde_connector.c

+ 7 - 1
msm/sde/sde_connector.c

@@ -1850,8 +1850,14 @@ static int sde_connector_atomic_set_property(struct drm_connector *connector,
 		break;
 	case CONNECTOR_PROP_LP:
 		/* suspend case: clear stale MISR */
-		if (val == SDE_MODE_DPMS_OFF)
+		if (val == SDE_MODE_DPMS_OFF) {
 			memset(&c_conn->previous_misr_sign, 0, sizeof(struct sde_misr_sign));
+			/* reset backlight scale of LTM */
+			if (c_conn->bl_scale_sv != MAX_SV_BL_SCALE_LEVEL) {
+				c_conn->bl_scale_sv = MAX_SV_BL_SCALE_LEVEL;
+				c_conn->bl_scale_dirty = true;
+			}
+		}
 		break;
 	default:
 		break;