drm/atomic: Don't set crtc_state->enable manually

The enable field needs to be kept in sync with the mode_blob field. Call
drm_atomic_set_mode_prop_for_crtc() instead of setting enable to false
in order to dereference the mode blob correctly.

v2:
- Check the return value of drm_atomic_set_mode_prop_for_crtc()
- Drop the num_connectors local variable

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Laurent Pinchart 2015-06-22 13:37:46 +03:00 committed by Daniel Vetter
parent ffc5fbdb77
commit c30f55a7b1

View File

@ -1555,10 +1555,14 @@ static int update_output_state(struct drm_atomic_state *state,
if (crtc == set->crtc) if (crtc == set->crtc)
continue; continue;
crtc_state->enable = if (!drm_atomic_connectors_for_crtc(state, crtc)) {
drm_atomic_connectors_for_crtc(state, crtc); ret = drm_atomic_set_mode_prop_for_crtc(crtc_state,
if (!crtc_state->enable) NULL);
if (ret < 0)
return ret;
crtc_state->active = false; crtc_state->active = false;
}
} }
return 0; return 0;