From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Herrmann Subject: Re: [PATCH v3 1/1] Documentation: drm: describing plane alpha and color blending property Date: Thu, 27 Mar 2014 13:38:41 +0100 Message-ID: References: <1395911183-25500-1-git-send-email-sagar.a.kamble@intel.com> <1395913998-31170-1-git-send-email-sagar.a.kamble@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1395913998-31170-1-git-send-email-sagar.a.kamble@intel.com> Sender: linux-doc-owner@vger.kernel.org To: sagar.a.kamble@intel.com Cc: Intel Graphics Development , rob@landley.net, Dave Airlie , Laurent Pinchart , Alex Deucher , =?ISO-8859-1?Q?Ville_Syrj=E4l=E4?= , vijay.a.purushothaman@intel.com, linux-doc@vger.kernel.org, "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org Hi On Thu, Mar 27, 2014 at 10:50 AM, wrote: > From: Sagar Kamble > > v2: Added description for "src-color" and "constant-alpha" property. > [Review by Laurent Pinchart] > > v3: Fixed typos. [Review by David Herrmann] > > Cc: Rob Landley > Cc: Dave Airlie > Cc: Daniel Vetter > Cc: Laurent Pinchart > Cc: David Herrmann > Cc: Alex Deucher > Cc: "Ville Syrj=E4l=E4" > Cc: Sagar Kamble > Cc: "Purushothaman, Vijay A" > Cc: linux-doc at vger.kernel.org > Cc: dri-devel at lists.freedesktop.org > Signed-off-by: Sagar Kamble > --- > Documentation/DocBook/drm.tmpl | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) > > diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/d= rm.tmpl > index 104402a..66386d0 100644 > --- a/Documentation/DocBook/drm.tmpl > +++ b/Documentation/DocBook/drm.tmpl > @@ -2253,6 +2253,14 @@ void intel_crt_init(struct drm_device *dev) > enumerated bits defined by the property. > > > + DRM_MODE_PROP_32BIT_PAIR > + This flag restricts all enumerated values = of Bitmask properties > + to the 0..31 range. > + 'get_property' operation will get combination of instanc= e values of one or more of the > + enumerated bits defined by the property. With 'set_prope= rty' operation, user can specify > + {value (MSB 32 bits), type (LSB 32 bits)} pair with 64 bi= t value for that property. This is a type description, right? I think this is overly complex (and I actually don't understand it). How about this: "Pair-properties store two packed 32 bit values as 64bit unsigned integer (often used as key-value pair). The lower 32bits contain the first value (also: key), while the upper 32bits contain the second value. Written as: ({key (LSB 32 bits), value (MSB 32 bits)})." That should be enough for anyone to understand it. Please note that I inverted 'type' and 'value' here. It's unnatural to list the value first. > + > + > DRM_MODE_PROP_BLOB > Blob properties store a binary blob withou= t any format > restriction. The binary blobs are created as KMS standal= one objects, > @@ -2336,7 +2344,7 @@ void intel_crt_init(struct drm_device *dev) > > > DRM > - Generic > + Generic > "EDID" > BLOB | IMMUTABLE > 0 > @@ -2351,6 +2359,19 @@ void intel_crt_init(struct drm_device *dev) > Contains DPMS operation mode value. > > > + "blend" > + BITMASK | 32BIT_PAIR Ugh? This is not a bitmask, is it? It's just a 32BIT_PAIR, right? > + { {0, "zero"}, {1, "one"}, {2, "src-color= "}, {3, "one-minus-src-color"} > + , {4, "dst-color"}, {5, "one-minus-dst-color"}, {6, "src-alph= a"}, {7, "one-minus-src-alpha"}, {8, "dst-alpha"} > + , {9, "one-minus-dst-alpha"}, {10, "constant-color"}, {11, "o= ne-minus-constant-color"}, {12, "constant-alpha"} > + , {13, "one-minus-constant-alpha"}, {14, "alpha-saturate"} }<= /td> I think brackets are weird to describe enums, a table would be nicer. People might misread this as 32-bit pairs, which this isn't. If you want to avoid writing yet another table, how about: ZERO =3D 0, ONE =3D 1, SRC_COLOR =3D 2, .. and so on? > + Plane > + Contains plane alpha/color blending opera= tion values. These are modeled after glBlendFunc API Remove 'API' (or add 'the', like 'the glBlendFunc API'). > + in OpenGL. Currently only "src-color" and "constant-alpha" ar= e supported. "src-color" will consider supplied fb This is a driver-dependent statement. I don't think it belongs here. I'd rather write it as "Not all modes are supported by all drivers.". Also, please do line-breaks in front of . They start new-paragraphs, so we should do the same in the code (same below). > + with plane's pixel format as input without any additional col= or/alpha changes."constant-alpha" will apply constant > + transparency to all pixels in addition to source color. I would just drop the description of each of the modes. They're described in the man-pages of glBlendFunc and everyone knows them (and they're fairly obvious). However, this doc doesn't describe the second value at all? glBlendFunc() takes two of these enums, one for the source, one for the target. So please add some statement like: "The first value of the 32BIT_PAIR describes the blending factors of the source image, the second value describes the blending factors of the destination image." Thanks David > + > + > DVI-I > "subconnector" > ENUM > -- > 1.8.5 >