Skip to contentSkip to conversation

drm/atomic: Clear crtc_state->active in drm_atomic_helper_set_config.

PATCH New Maarten Lankhorst 1 participant 1 message Jun 1, 2015

Subsystems (2)
lore
Share & tools
lore

Maarten Lankhorst

author maintainer
#0 lore raw

PATCH 1/1 drm/atomic: Clear crtc_state->active in drm_atomic_helper_set_config.

This fixes some regressions in i915 when converting to atomic. set_config failed with -EINVAL, and I received the following warning in dmesg:

[drm:drm_atomic_crtc_check] [CRTC:20] active without enabled

Solve this by clearing active when a crtc is disabled.

Because crtc_state->enable implies that connectors are active the change from disabled->enabled can only happen for the crtc that's being set_config'd, and checking for !crtc_state->enable is sufficient here.

---

drivers/gpu/drm/drm_atomic_helper.c +2 -0
index ab5cb9b4f2d8..c3999dd41c20 100644
@@ -1572,6 +1572,8 @@ static int update_output_state(struct drm_atomic_state *state,
 
 		crtc_state->enable =
 			drm_atomic_connectors_for_crtc(state, crtc);
+		if (!crtc_state->enable)
+			crtc_state->active = false;
 	}
 
 	return 0;

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx