Re: [PATCH v2 1/4] drm/crtc: Add property for aspect ratio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

Attachment: pgpPL_BTkPRHw.pgp
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux