diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-06-22 13:37:46 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-06-22 13:45:33 +0200 |
commit | c30f55a7b1336cdfeac74c7931ebff40a32e72b7 (patch) | |
tree | 13e054921779dcef702c0fe199342ca7dabb55bc /drivers/gpu | |
parent | ffc5fbdb77e125a5923e3c0ba3fe465b1ebb2c54 (diff) | |
download | linux-c30f55a7b1336cdfeac74c7931ebff40a32e72b7.tar.bz2 |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index b06a607db6c2..5b59d5ad7d1c 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -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; |