On Wed, Jun 11, 2014 at 10:46:48AM +0530, Vandana Kannan wrote: > Added a property to enable user space to set aspect ratio. > This patch contains declaration of the property and code to create the > property. > > v2: Thierry's review comments. > - Made aspect ratio enum generic instead of HDMI/CEA specfic > - Removed usage of temporary aspect_ratio variable > > v3: Thierry's review comments. > - Fixed indentation > > v4: Thierry's review comments. > - Return ENOMEM when property creation fails > > Signed-off-by: Vandana Kannan <vandana.kannan@xxxxxxxxx> > Cc: Thierry Reding <thierry.reding@xxxxxxxxx> > --- > drivers/gpu/drm/drm_crtc.c | 33 +++++++++++++++++++++++++++++++++ > include/drm/drm_crtc.h | 2 ++ > include/uapi/drm/drm_mode.h | 5 +++++ > 3 files changed, 40 insertions(+) One nit below... > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index 37a3e07..a745df3 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -139,6 +139,12 @@ static const struct drm_prop_enum_list drm_scaling_mode_enum_list[] = > { DRM_MODE_SCALE_ASPECT, "Full aspect" }, > }; > > +static const struct drm_prop_enum_list drm_aspect_ratio_enum_list[] = { > + { DRM_MODE_PICTURE_ASPECT_NONE, "Automatic" }, > + { DRM_MODE_PICTURE_ASPECT_4_3, "4:3" }, > + { DRM_MODE_PICTURE_ASPECT_16_9, "16:9" }, > +}; > + > /* > * Non-global properties, but "required" for certain connectors. > */ > @@ -1344,6 +1350,33 @@ int drm_mode_create_scaling_mode_property(struct drm_device *dev) > EXPORT_SYMBOL(drm_mode_create_scaling_mode_property); > > /** > + * 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. > + * > + * Returns: According to Documentation/kernel-doc-nano-HOWTO.txt this section should be named "Return:". But it seems that at least in DRM "Returns:" is used much more often (89:31), so with or without this addressed: Reviewed-by: Thierry Reding <treding@xxxxxxxxxx>
Attachment:
pgp2gqzXsD3iQ.pgp
Description: PGP signature
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel