Skip to contentSkip to conversation

drm/msm/mdp: full mode set if crtc enable state is changed

PATCH New Jilai Wang 1 participant 1 message Jan 26, 2015

Subsystems (3)
lore
Share & tools
lore

Jilai Wang

author
#0 lore raw

PATCH 1/1 drm/msm/mdp: full mode set if crtc enable state is changed

Crtc state may not reflect the current crtc state if drm_fb_helper_blank is called to turn dpms off without turning crtc off. A full modeset in this case to solve the problem.

---
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +7 -0
index eea209e..60d0f58 100644
@@ -310,6 +310,13 @@ static int mdp5_crtc_atomic_check(struct drm_crtc *crtc,
 			return -EINVAL;
 	}
 
+	/*
+	 * check if the crtc state matches with the current state
+	 * if not match, force a full mode set
+	 */
+	if (state->enable != mdp5_crtc->enabled)
+		state->mode_changed = true;
+
 	/* verify that there are not too many planes attached to crtc
 	 * and that we don't have conflicting mixer stages:
 	 */
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project