[PATCH v12 6/6] drm_modes: add of_videomode helpers

Tomi Valkeinen tomi.valkeinen at ti.com
Wed Nov 21 23:52:50 EST 2012


On 2012-11-20 17:54, Steffen Trumtrar wrote:
> Add helper to get drm_display_mode from devicetree.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar at pengutronix.de>
> Reviewed-by: Thierry Reding <thierry.reding at avionic-design.de>
> Acked-by: Thierry Reding <thierry.reding at avionic-design.de>
> Tested-by: Thierry Reding <thierry.reding at avionic-design.de>
> Tested-by: Philipp Zabel <p.zabel at pengutronix.de>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
>  drivers/gpu/drm/drm_modes.c |   35 ++++++++++++++++++++++++++++++++++-
>  include/drm/drmP.h          |    6 ++++++
>  2 files changed, 40 insertions(+), 1 deletion(-)
> 

> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index de2f6cf..377280f 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -56,6 +56,7 @@
>  #include <linux/cdev.h>
>  #include <linux/mutex.h>
>  #include <linux/slab.h>
> +#include <linux/of.h>
>  #include <linux/videomode.h>
>  #if defined(__alpha__) || defined(__powerpc__)
>  #include <asm/pgtable.h>	/* For pte_wrprotect */
> @@ -1459,6 +1460,11 @@ drm_mode_create_from_cmdline_mode(struct drm_device *dev,
>  extern int drm_display_mode_from_videomode(const struct videomode *vm,
>  					   struct drm_display_mode *dmode);
>  #endif
> +#if IS_ENABLED(CONFIG_OF_VIDEOMODE)
> +extern int of_get_drm_display_mode(const struct device_node *np,
> +				   struct drm_display_mode *dmode,
> +				   unsigned int index);
> +#endif
>  
>  /* Modesetting support */
>  extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);

And the same comments here also.

 Tomi



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 897 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20121121/cb0ac680/attachment.sig>


More information about the devicetree-discuss mailing list