From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v2 1/4] drm/crtc: Add property for aspect ratio Date: Thu, 5 Jun 2014 08:40:03 +0200 Message-ID: <20140605064001.GB30845@ulmo> References: <20140526075447.GU14357@phenom.ffwll.local> <1401098683-30224-1-git-send-email-vandana.kannan@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1640268198==" Return-path: In-Reply-To: <1401098683-30224-1-git-send-email-vandana.kannan@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Vandana Kannan Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1640268198== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0eh6TmSyL6TZE2Uz" Content-Disposition: inline --0eh6TmSyL6TZE2Uz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 26, 2014 at 03:34:43PM +0530, Vandana Kannan wrote: [...] > @@ -1344,6 +1350,27 @@ int drm_mode_create_scaling_mode_property(struct d= rm_device *dev) > EXPORT_SYMBOL(drm_mode_create_scaling_mode_property); > =20 > /** > + * 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 de= sired > + * 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 =3D > + drm_property_create_enum(dev, 0, "aspect ratio", > + drm_aspect_ratio_enum_list, > + ARRAY_SIZE(drm_aspect_ratio_enum_list)); Indentation here is funny. Given the long names involved here it's difficult to make this look good, but at least the last parameter here could be aligned with the second to last. > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h > index 5c1c31c..1149617 100644 > --- a/include/drm/drm_crtc.h > +++ b/include/drm/drm_crtc.h > @@ -801,6 +801,7 @@ struct drm_mode_config { > =20 > /* Optional properties */ > struct drm_property *scaling_mode_property; > + struct drm_property *aspect_ratio_property; > struct drm_property *dirty_info_property; This seems rather randomly inserted into the list. I think either the list should be sorted alphabetically or you should append new entries. But that's somewhat bikesheddy, so feel free to ignore. With my first comment addressed: Reviewed-by: Thierry Reding --0eh6TmSyL6TZE2Uz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTkBDBAAoJEN0jrNd/PrOh6lwP/3KloYrWMkNVmZEPAritg8O4 FpCzJfOMDIsVsIsZSQsF9BR4gx/icLIv9ayXOEl67V2Hh57D8iMShXYoxSwmDPT7 NbGfnl2zOJbKKXr6YXFO2vGoXF31RO8/1l5dFXQcbIbmwPRDbqqgRJrhCInUaesM 4Mr2eHqHDqlEgvTYPkA55yK0OKM3NjT6OvmMjWtwXTSHQCzt0pOdkWBSI5Syz2X6 EN9+qIr5gWecXQ2Z7yWYnTq/J7QyP//sznlBIyqkV+ZtgcarR9loVTStW+TFwbja dEFZEHTvnFCGM2rTIbKGJeVJD1+GrS1DnbK3j2aePTXQ6GuJup4Seg2eUX7MYhne aJFqTby80I26b822+K548Si0eM3xzzGplxwrsU3yQHaToY0P96LsTeu2Vy5xMuEe 703hNXr9+7MiLgtAaYHMCt8XVDdreIzQ3WOouAFCVDtIfdm6YZ6GBag78vsDwtGy lxtLGQHHYgMxVjAg13moHMjFF/FlfUnKtt+/MAxfT4IMvz60GQBQclm7NJmH5YGR JuUh/Q9spFro0Kn2Gs90/agANwKTog3SLnJnZIye8EqhLv/DSJ7X+l1OlwG3hpIo 6VZwpPBwluwuFhCQpa9lUmoZnSQ9jsd/UHyQs1NmYw70bdplYrRXzRy3CfpBMQkZ W+S9p3py0rlb1zmFTXnJ =3ECe -----END PGP SIGNATURE----- --0eh6TmSyL6TZE2Uz-- --===============1640268198== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1640268198==--