diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-05-01 15:37:54 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-05-08 13:20:43 +0200 |
commit | 8f6e1e22e7d0d4697120e82845036db4f9e4de5b (patch) | |
tree | db8da9d64ea548ec71a010634cb1481c83b3e9e4 /include/drm/drm_connector.h | |
parent | 0e9f25d0e15fd9f57d533740d3717a2415cc4025 (diff) | |
download | linux-stable-8f6e1e22e7d0d4697120e82845036db4f9e4de5b.tar.gz linux-stable-8f6e1e22e7d0d4697120e82845036db4f9e4de5b.tar.bz2 linux-stable-8f6e1e22e7d0d4697120e82845036db4f9e4de5b.zip |
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 'include/drm/drm_connector.h')
-rw-r--r-- | include/drm/drm_connector.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 1ecf5f2619c0..9c15993b9071 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -332,10 +332,16 @@ struct drm_connector_state { * @picture_aspect_ratio: Connector property to control the * HDMI infoframe aspect ratio setting. * - * The DRM_MODE_PICTURE_ASPECT_\* values much match the + * The %DRM_MODE_PICTURE_ASPECT_\* values much match the * values for &enum hdmi_picture_aspect */ enum hdmi_picture_aspect picture_aspect_ratio; + + /** + * @scaling_mode: Connector property to control the + * upscaling, mostly used for built-in panels. + */ + unsigned int scaling_mode; }; /** @@ -685,6 +691,7 @@ struct drm_cmdline_mode { * @tile_v_loc: vertical location of this tile * @tile_h_size: horizontal size of this tile. * @tile_v_size: vertical size of this tile. + * @scaling_mode_property: Optional atomic property to control the upscaling. * * Each connector may be connected to one or more CRTCs, or may be clonable by * another connector if they can share a CRTC. Each connector also has a specific @@ -764,6 +771,8 @@ struct drm_connector { struct drm_property_blob *edid_blob_ptr; struct drm_object_properties properties; + struct drm_property *scaling_mode_property; + /** * @path_blob_ptr: * @@ -963,6 +972,8 @@ int drm_mode_create_tv_properties(struct drm_device *dev, unsigned int num_modes, const char * const modes[]); int drm_mode_create_scaling_mode_property(struct drm_device *dev); +int drm_connector_attach_scaling_mode_property(struct drm_connector *connector, + u32 scaling_mode_mask); int drm_mode_create_aspect_ratio_property(struct drm_device *dev); int drm_mode_create_suggested_offset_properties(struct drm_device *dev); |