This is required to for i915 to convert connector properties to atomic.

Signed-off-by: Maarten Lankhorst <maarten.lankho...@linux.intel.com>
Cc: dri-de...@lists.freedesktop.org
---
 drivers/gpu/drm/drm_atomic.c | 8 ++++++++
 include/drm/drm_connector.h  | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index f32506a7c1d6..052cfe2376f8 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1123,6 +1123,10 @@ int drm_atomic_connector_set_property(struct 
drm_connector *connector,
                 */
                if (state->link_status != DRM_LINK_STATUS_GOOD)
                        state->link_status = val;
+       } else if (property == config->aspect_ratio_property) {
+               state->picture_aspect_ratio = val;
+       } else if (property == config->scaling_mode_property) {
+               state->scaling_mode = val;
        } else if (connector->funcs->atomic_set_property) {
                return connector->funcs->atomic_set_property(connector,
                                state, property, val);
@@ -1199,6 +1203,10 @@ drm_atomic_connector_get_property(struct drm_connector 
*connector,
                *val = state->tv.hue;
        } else if (property == config->link_status_property) {
                *val = state->link_status;
+       } else if (property == config->aspect_ratio_property) {
+               *val = state->picture_aspect_ratio;
+       } else if (property == config->scaling_mode_property) {
+               *val = state->scaling_mode;
        } else if (connector->funcs->atomic_get_property) {
                return connector->funcs->atomic_get_property(connector,
                                state, property, val);
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 4eeda120e46d..3b819cd1d858 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -326,6 +326,9 @@ struct drm_connector_state {
        struct drm_atomic_state *state;
 
        struct drm_tv_connector_state tv;
+
+       unsigned int picture_aspect_ratio;
+       unsigned int scaling_mode;
 };
 
 /**
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to