[Intel-gfx] [PATCH v2 1/4] drm/crtc: Add property for aspect ratio

Thierry Reding thierry.reding at gmail.com
Thu Jun 5 08:40:03 CEST 2014


On Mon, May 26, 2014 at 03:34:43PM +0530, Vandana Kannan wrote:
[...]
> @@ -1344,6 +1350,27 @@ int drm_mode_create_scaling_mode_property(struct drm_device *dev)
>  EXPORT_SYMBOL(drm_mode_create_scaling_mode_property);
>  
>  /**
> + * drm_mode_create_aspect_ratio_property - create aspect ratio property
> + * @dev: DRM device
> + *
> + * Called by a driver the first time it's needed, must be attached to desired
> + * connectors.
> + */
> +int drm_mode_create_aspect_ratio_property(struct drm_device *dev)
> +{
> +	if (dev->mode_config.aspect_ratio_property)
> +		return 0;
> +
> +	dev->mode_config.aspect_ratio_property =
> +		drm_property_create_enum(dev, 0, "aspect ratio",
> +				drm_aspect_ratio_enum_list,
> +				    ARRAY_SIZE(drm_aspect_ratio_enum_list));

Indentation here is funny. Given the long names involved here it's
difficult to make this look good, but at least the last parameter here
could be aligned with the second to last.

> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 5c1c31c..1149617 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -801,6 +801,7 @@ struct drm_mode_config {
>  
>  	/* Optional properties */
>  	struct drm_property *scaling_mode_property;
> +	struct drm_property *aspect_ratio_property;
>  	struct drm_property *dirty_info_property;

This seems rather randomly inserted into the list. I think either the
list should be sorted alphabetically or you should append new entries.
But that's somewhat bikesheddy, so feel free to ignore.

With my first comment addressed:

Reviewed-by: Thierry Reding <treding at nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140605/a51bbd49/attachment.sig>


More information about the Intel-gfx mailing list