drm: atomic: Expose CRTC active property
authorDaniel Stone <daniels@collabora.com>
Thu, 19 Mar 2015 04:33:25 +0000 (04:33 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 23 Mar 2015 15:22:31 +0000 (16:22 +0100)
Active was here, and we allowed users to set it, but not to get it as
well.

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

index a6caaae40b9ebc25e26b80e7071f240431b3f31b..e7af6b89b3925b9e387b23b15df667b6b354f0c6 100644 (file)
@@ -266,9 +266,17 @@ int drm_atomic_crtc_get_property(struct drm_crtc *crtc,
                const struct drm_crtc_state *state,
                struct drm_property *property, uint64_t *val)
 {
-       if (crtc->funcs->atomic_get_property)
+       struct drm_device *dev = crtc->dev;
+       struct drm_mode_config *config = &dev->mode_config;
+
+       if (property == config->prop_active)
+               *val = state->active;
+       else if (crtc->funcs->atomic_get_property)
                return crtc->funcs->atomic_get_property(crtc, state, property, val);
-       return -EINVAL;
+       else
+               return -EINVAL;
+
+       return 0;
 }
 
 /**