[PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Paulo Zanoni
2012/3/30 Paulo Zanoni : > Can't we try to add some document > (or header file) defining the standard properties and add a way to > distinguish between? Documentation/drm/properties.txt? > After looking at the list names, maybe we should define that standard properties should be named with "BIG

[PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Paulo Zanoni
2012/3/30 Ville Syrj?l? : > > I would suggest we either A) define some namespace for standard > properties, or B) introduce some new property mechanism that actually > uses integer property IDs. In either case new properties or changes to > existing standard properties should be carefully

[PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Ville Syrjälä
On Thu, Mar 29, 2012 at 08:15:48PM -0500, Rob Clark wrote: > On Thu, Mar 29, 2012 at 8:02 PM, Rob Clark wrote: > > From: Rob Clark > > > > A bitmask property is similar to an enum. ?The enum value is a bit > > position (0-63), and valid property values consist of a mask of > > zero or more of (1

[PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Marcus Lorentzon
On 03/30/2012 12:37 PM, Ville Syrj?l? wrote: > On Thu, Mar 29, 2012 at 08:15:48PM -0500, Rob Clark wrote: >> On Thu, Mar 29, 2012 at 8:02 PM, Rob Clark wrote: >>> From: Rob Clark >>> >>> A bitmask property is similar to an enum. The enum value is a bit >>> position (0-63), and valid property

[PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Chris Wilson
On Thu, 29 Mar 2012 20:02:45 -0500, Rob Clark wrote: > + } else if (property->flags & DRM_MODE_PROP_BITMASK) { > + int i; > + __u64 valid_mask = 0; > + for (i = 0; i < property->num_values; i++) > + valid_mask |= (1 <<

[PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Rob Clark
On Fri, Mar 30, 2012 at 5:37 AM, Ville Syrj?l? wrote: > On Thu, Mar 29, 2012 at 08:15:48PM -0500, Rob Clark wrote: >> On Thu, Mar 29, 2012 at 8:02 PM, Rob Clark wrote: >> > From: Rob Clark >> > >> > A bitmask property is similar to an enum. ?The enum value is a bit >> > position (0-63), and

Re: [PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Chris Wilson
On Thu, 29 Mar 2012 20:02:45 -0500, Rob Clark rob.cl...@linaro.org wrote: + } else if (property-flags DRM_MODE_PROP_BITMASK) { + int i; + __u64 valid_mask = 0; + for (i = 0; i property-num_values; i++) + valid_mask |= (1

Re: [PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Ville Syrjälä
On Thu, Mar 29, 2012 at 08:15:48PM -0500, Rob Clark wrote: On Thu, Mar 29, 2012 at 8:02 PM, Rob Clark rob.cl...@linaro.org wrote: From: Rob Clark r...@ti.com A bitmask property is similar to an enum.  The enum value is a bit position (0-63), and valid property values consist of a mask of

Re: [PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Marcus Lorentzon
On 03/30/2012 12:37 PM, Ville Syrjälä wrote: On Thu, Mar 29, 2012 at 08:15:48PM -0500, Rob Clark wrote: On Thu, Mar 29, 2012 at 8:02 PM, Rob Clarkrob.cl...@linaro.org wrote: From: Rob Clarkr...@ti.com A bitmask property is similar to an enum. The enum value is a bit position (0-63), and

Re: [PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Rob Clark
On Fri, Mar 30, 2012 at 5:37 AM, Ville Syrjälä ville.syrj...@linux.intel.com wrote: On Thu, Mar 29, 2012 at 08:15:48PM -0500, Rob Clark wrote: On Thu, Mar 29, 2012 at 8:02 PM, Rob Clark rob.cl...@linaro.org wrote: From: Rob Clark r...@ti.com A bitmask property is similar to an enum.  The

Re: [PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Paulo Zanoni
2012/3/30 Ville Syrjälä ville.syrj...@linux.intel.com: I would suggest we either A) define some namespace for standard properties, or B) introduce some new property mechanism that actually uses integer property IDs. In either case new properties or changes to existing standard properties

Re: [PATCH RFC 1/2] drm: add bitmask property type

2012-03-30 Thread Paulo Zanoni
2012/3/30 Paulo Zanoni przan...@gmail.com: Can't we try to add some document (or header file) defining the standard properties and add a way to distinguish between? Documentation/drm/properties.txt? After looking at the list names, maybe we should define that standard properties should be

[PATCH RFC 1/2] drm: add bitmask property type

2012-03-29 Thread Rob Clark
On Thu, Mar 29, 2012 at 8:02 PM, Rob Clark wrote: > From: Rob Clark > > A bitmask property is similar to an enum. ?The enum value is a bit > position (0-63), and valid property values consist of a mask of > zero or more of (1 << enum_val[n]). > > TODO: word commit msg better > TODO: maybe

[PATCH RFC 1/2] drm: add bitmask property type

2012-03-29 Thread Rob Clark
From: Rob Clark A bitmask property is similar to an enum. The enum value is a bit position (0-63), and valid property values consist of a mask of zero or more of (1 << enum_val[n]). TODO: word commit msg better TODO: maybe "flags" would be a better name for the property type? ---

[PATCH RFC 1/2] drm: add bitmask property type

2012-03-29 Thread Rob Clark
From: Rob Clark r...@ti.com A bitmask property is similar to an enum. The enum value is a bit position (0-63), and valid property values consist of a mask of zero or more of (1 enum_val[n]). TODO: word commit msg better TODO: maybe flags would be a better name for the property type? --- See

Re: [PATCH RFC 1/2] drm: add bitmask property type

2012-03-29 Thread Rob Clark
On Thu, Mar 29, 2012 at 8:02 PM, Rob Clark rob.cl...@linaro.org wrote: From: Rob Clark r...@ti.com A bitmask property is similar to an enum.  The enum value is a bit position (0-63), and valid property values consist of a mask of zero or more of (1 enum_val[n]). TODO: word commit msg