drm: atomic: Allow setting CRTC active property
authorDaniel Stone <daniels@collabora.com>
Thu, 19 Mar 2015 04:33:26 +0000 (04:33 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 23 Mar 2015 15:22:31 +0000 (16:22 +0100)
Before, we would set the property, but also return -EINVAL because of a
broken fallthrough.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_atomic.c

index e7af6b8..5d3abe3 100644 (file)
@@ -248,11 +248,14 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
        struct drm_mode_config *config = &dev->mode_config;
 
        /* FIXME: Mode prop is missing, which also controls ->enable. */
-       if (property == config->prop_active) {
+       if (property == config->prop_active)
                state->active = val;
-       else if (crtc->funcs->atomic_set_property)
+       else if (crtc->funcs->atomic_set_property)
                return crtc->funcs->atomic_set_property(crtc, state, property, val);
-       return -EINVAL;
+       else
+               return -EINVAL;
+
+       return 0;
 }
 EXPORT_SYMBOL(drm_atomic_crtc_set_property);