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

Thierry Reding thierry.reding at gmail.com
Thu Jun 5 11:28:21 CEST 2014


On Thu, Jun 05, 2014 at 02:40:08PM +0530, Vandana Kannan wrote:
[...]
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
[...]
>  /**
> + * 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));
> +
> +	return 0;

Sorry for not noticing this before: what if drm_propert_create_enum()
fails? Should that return an error? This function will currently
silently ignore failure to create the property.

Thierry
-------------- 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/dbfdb02a/attachment.sig>


More information about the Intel-gfx mailing list