From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v3 1/4] drm/crtc: Add property for aspect ratio Date: Thu, 5 Jun 2014 11:28:21 +0200 Message-ID: <20140605092819.GB23099@ulmo> References: <20140605064001.GB30845@ulmo> <1401959408-11140-1-git-send-email-vandana.kannan@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0989118847==" Return-path: In-Reply-To: <1401959408-11140-1-git-send-email-vandana.kannan@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Vandana Kannan Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0989118847== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R3G7APHDIzY6R/pk" Content-Disposition: inline --R3G7APHDIzY6R/pk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jun 05, 2014 at 02:40:08PM +0530, Vandana Kannan wrote: [...] > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c [...] > /** > + * 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 desired > + * 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 = > + drm_property_create_enum(dev, 0, "aspect ratio", > + drm_aspect_ratio_enum_list, > + ARRAY_SIZE(drm_aspect_ratio_enum_list)); > + > + return 0; Sorry for not noticing this before: what if drm_propert_create_enum() fails? Should that return an error? This function will currently silently ignore failure to create the property. Thierry --R3G7APHDIzY6R/pk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTkDgzAAoJEN0jrNd/PrOh1VEQALY8IJCZiL8q4l7mnsECXerc rrBbzK28L4A62LDhQqoLEwmgc9Bdl7d+vgsApInMlFHOPpzClYO7NNteWiy4giol DZyhZJVYlR8IT79EyLXUUZlNBN5JpVaTDLHMBOBX9a/AuULwveI55hf6pxxF3Qul 4ACUSFQg5Q+9wOFkrZAfkIFF0ODeilpVdBDyilK7Y/itXWPkyUxQ9COTOXl0HcWV i3TBAOy7hMBak7QNLxqeseKWVY4orWAbV10W8RyGGnY7+KAUJOwK/xIWdxPGH8Da 4d/TkqHuUvhqvdIUw8LYizT1KgcIo5OPZKIfZfofEiETyjcYnTIBcrDprD/N5TVw deI+ic6Tx0LMyPFv1wBL5gJwiDnr0CCvdiZXcEvsGI+fhW3M3olooZp4pqn4USQK 6hji80/zPdUd+/w0WrTsjwFVGexdakdhNzb4ozELeJrHW10n4o5/D7mhKm6mv7W/ MeaPPl1OQoglFQodIyQCIjdcrAl6a325erZYVvsFwCN7ZCxweSNCE1ZqVH0oMbcD B94TJNy/3nzizK2JK7hZSs7npSeaTMWw3jRPDrUPRLXcHYxpp+Yyy/iKA0eYEKcm whjTg8RDkh9DhlqcAgwvx0nC3NcRBkMDiN6CeNZed3l+m3SzXSVn1knl8/5GuEnt f+XkmBwPqcNPY8yEDln5 =/UIL -----END PGP SIGNATURE----- --R3G7APHDIzY6R/pk-- --===============0989118847== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0989118847==--