From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm: Add standardized boolean props Date: Thu, 22 Jan 2015 09:52:40 +0100 Message-ID: <20150122085238.GA30706@ulmo> References: <1421791754-6244-1-git-send-email-daniel.vetter@ffwll.ch> <1421826458-9115-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2040814049==" Return-path: In-Reply-To: <1421826458-9115-1-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: Daniel Vetter , Intel Graphics Development , DRI Development List-Id: intel-gfx@lists.freedesktop.org --===============2040814049== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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(str= uct drm_device *dev, int flags > } > EXPORT_SYMBOL(drm_property_create_range); > =20 > +/** > + * drm_property_create_signed_range - create a new signed ranged propert= y 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 va= lues. > + * > + * Returns: > + * A pointer to the newly created property on success, NULL on failure. > + */ > +struct drm_property *drm_property_create_bool(struct drm_device *dev, in= t 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 --UugvWAfsgieZRqgk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUwLpWAAoJEN0jrNd/PrOhnLsP/2GZmLkPDqqLkUXE3fwzLEGi buUWY6oqZJl3aMjYV5iqiDT82PFXLFA+UcysSZv2vezNJBYsI3Ad4IKqKLmLONrE 1zvhODKS7arfuxk0+zTfyXbS51OxhEClgrbI9dHyIuBAq7d75Iwk+qcZfPTptCsF NaR9IAhSIbc47MjaGmH0UM3Nzp5SAcr5oV+7GKwgnop2ea4beTZ2Y/0rDoOM04wn Lju4AE544hO+B4qHQvQKMoafctMChXYTD9Yru0DIFkgdwuOpKIoup3NiP+3MZhlp rx/e3nK+zK+Z+KTzqA6GbeBc8fsZkQ3iFioTTGVCrz5QFVzzm7MaIVjs3QRwl4YI 2UaXqSgVORGFT2d15SffuS6HObHcWT7/YLx5dMqftI34xHZ71yMzVYdhkRzmCPSS CelObB04skwJE5za6h9eD1/HXEC2uzdoO4Ipz6mkcJbneiVdqjZjQm3p8Kv6YMUF R2Jn7b/UBDWOaJcFpcXYtfGGHF4Wh9n0KRYtfuxYcZNhXyg1AW7sHfn3/U0sAaen d3hivojKBIwxFOp6/uFB0Kg+M5noQaxv5jXWhrNKhkUxUSiKXu9WCMVMeUGRcVC2 qI+0v2Z6+2r7g5lAMj8au2n2Wyi6+1U5VwOm6XOzOUeXhLPJzo9/dE1wWJG2k85t b8+Mh8uf3PeKjqBEK4KX =YSA0 -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk-- --===============2040814049== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9pbnRlbC1nZngK --===============2040814049==--