summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_atomic.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-05-01 15:37:54 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-05-08 13:20:43 +0200
commit8f6e1e22e7d0d4697120e82845036db4f9e4de5b (patch)
treedb8da9d64ea548ec71a010634cb1481c83b3e9e4 /drivers/gpu/drm/drm_atomic.c
parent0e9f25d0e15fd9f57d533740d3717a2415cc4025 (diff)
downloadop-kernel-dev-8f6e1e22e7d0d4697120e82845036db4f9e4de5b.zip
op-kernel-dev-8f6e1e22e7d0d4697120e82845036db4f9e4de5b.tar.gz
drm/atomic: Add support for custom scaling mode properties, v2
Some connectors may not allow all scaling mode properties, this function will allow creating the scaling mode property with only the supported subset. It also wires up this state for atomic. This will make it possible to convert i915 connectors to atomic. Changes since v1: - Add DRM_MODE_PROP_ENUM flag to drm_property_create - Use the correct index in drm_property_add_enum. - Add DocBook for function (Sean Paul). - Warn if less than 2 valid scaling modes are passed. - Remove level of indent. (Sean Paul) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170501133804.8116-3-maarten.lankhorst@linux.intel.com [mlankhorst: Rename function, fix docbook issues] Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
-rw-r--r--drivers/gpu/drm/drm_atomic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 461237c..cdec19a 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1190,6 +1190,8 @@ int drm_atomic_connector_set_property(struct drm_connector *connector,
state->link_status = val;
} else if (property == config->aspect_ratio_property) {
state->picture_aspect_ratio = val;
+ } else if (property == connector->scaling_mode_property) {
+ state->scaling_mode = val;
} else if (connector->funcs->atomic_set_property) {
return connector->funcs->atomic_set_property(connector,
state, property, val);
@@ -1268,6 +1270,8 @@ drm_atomic_connector_get_property(struct drm_connector *connector,
*val = state->link_status;
} else if (property == config->aspect_ratio_property) {
*val = state->picture_aspect_ratio;
+ } else if (property == connector->scaling_mode_property) {
+ *val = state->scaling_mode;
} else if (connector->funcs->atomic_get_property) {
return connector->funcs->atomic_get_property(connector,
state, property, val);
OpenPOWER on IntegriCloud