Re: [PATCH] drm: Add standardized boolean props

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

 



On Wed, Jan 21, 2015 at 08:47:38AM +0100, Daniel Vetter wrote:
[...]
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
[...]
> @@ -3738,6 +3738,24 @@ struct drm_property *drm_property_create_range(struct drm_device *dev, int flags
>  }
>  EXPORT_SYMBOL(drm_property_create_range);
>  
> +/**
> + * drm_property_create_signed_range - create a new signed ranged property type
> + * @dev: drm device
> + * @flags: flags specifying the property type
> + * @name: name of the property
> + * @min: minimum value of the property
> + * @max: maximum value of the property
> + *
> + * This creates a new generic drm property which can then be attached to a drm

Nit: s/drm/DRM/ but that's the same for all others so can be done in a
follow-up. I'll volunteer because I realize that not everybody is that
pedantic.

>  /**
> + * drm_property_create_bool - create a new boolean property type
> + * @dev: drm device
> + * @flags: flags specifying the property type
> + * @name: name of the property
> + *
> + * This creates a new generic drm property which can then be attached to a drm
> + * object with drm_object_attach_property. The returned property object must be
> + * freed with drm_property_destroy.
> + *
> + * This is implemented as a ranged property with only {0, 1} as valid values.
> + *
> + * Returns:
> + * A pointer to the newly created property on success, NULL on failure.
> + */
> +struct drm_property *drm_property_create_bool(struct drm_device *dev, int flags,

I find that int is a strange type for flags. unsigned long is a little
more idiomatic in my opinion. But again all other functions seem to do
the same, so no need to respin because of that.

Reviewed-by: Thierry Reding <treding@xxxxxxxxxx>

Attachment: pgpzdkrkrWfEm.pgp
Description: PGP signature

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux