Ver código fonte

disp: msm: sde: force revalidation of LTM and RC features

Currently revalidation of features happening for mode change(like
fps change, resolution change). This change limits revalidation
of feature only to resolution switch.

Change-Id: I3678e0e94eaad51e7b7a342eb451aa6329e8279d
Signed-off-by: Anjaneya Prasad Musunuri <[email protected]>
Anjaneya Prasad Musunuri 1 ano atrás
pai
commit
686443a90f
1 arquivos alterados com 6 adições e 2 exclusões
  1. 6 2
      msm/sde/sde_color_processing.c

+ 6 - 2
msm/sde/sde_color_processing.c

@@ -2120,6 +2120,7 @@ int sde_cp_crtc_check_properties(struct drm_crtc *crtc,
 {
 	struct sde_crtc *sde_crtc = NULL;
 	struct sde_crtc_state *sde_crtc_state = NULL;
+	struct drm_display_mode *old_mode, *new_mode;
 	int i, ret = 0;
 
 	if (!crtc || !crtc->dev || !state) {
@@ -2140,8 +2141,11 @@ int sde_cp_crtc_check_properties(struct drm_crtc *crtc,
 		return -EINVAL;
 	}
 
-	/* force revalidation of some properties when there is a mode switch */
-	if (state->mode_changed)
+	/* force revalidation of some properties when there is a resolution switch */
+	old_mode = &crtc->state->adjusted_mode;
+	new_mode = &state->adjusted_mode;
+	if ((old_mode->hdisplay != new_mode->hdisplay) ||
+		(old_mode->vdisplay != new_mode->vdisplay))
 		sde_cp_crtc_res_change(crtc);
 
 	mutex_lock(&sde_crtc->crtc_cp_lock);