From: Daniel Stone Date: Thu, 19 Mar 2015 04:33:25 +0000 (+0000) Subject: drm: atomic: Expose CRTC active property X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8f164ce41d1beaebfde99bcbf8bdaafb868eb7ae;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm: atomic: Expose CRTC active property Active was here, and we allowed users to set it, but not to get it as well. Signed-off-by: Daniel Stone Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index a6caaae40b9e..e7af6b89b392 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -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; } /**