Skip to content

Commit

Permalink
drm/atomic: Don't set crtc_state->enable manually
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Pinchart authored and Daniel Vetter committed Jun 22, 2015
1 parent ffc5fbd commit c30f55a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/gpu/drm/drm_atomic_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1555,10 +1555,14 @@ static int update_output_state(struct drm_atomic_state *state,
if (crtc == set->crtc)
continue;

crtc_state->enable =
drm_atomic_connectors_for_crtc(state, crtc);
if (!crtc_state->enable)
if (!drm_atomic_connectors_for_crtc(state, crtc)) {
ret = drm_atomic_set_mode_prop_for_crtc(crtc_state,
NULL);
if (ret < 0)
return ret;

crtc_state->active = false;
}
}

return 0;
Expand Down

0 comments on commit c30f55a

Please sign in to comment.