linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: "Mohammed, Afzal" <afzal@ti.com>
Cc: "devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	David Airlie <airlied@linux.ie>,
	Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Rob Clark <robdclark@gmail.com>,
	"Valkeinen, Tomi" <tomi.valkeinen@ti.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Guennady Liakhovetski <g.liakhovetski@gmx.de>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [PATCHv16 5/7] fbmon: add of_videomode helpers
Date: Mon, 07 Jan 2013 08:06:48 +0000	[thread overview]
Message-ID: <20130107080648.GB23478@pengutronix.de> (raw)
In-Reply-To: <C8443D0743D26F4388EA172BF4E2A7A93EA7FB02@DBDE01.ent.ti.com>

Hi Afzal,

On Mon, Jan 07, 2013 at 06:10:13AM +0000, Mohammed, Afzal wrote:
> Hi Steffen,
> 
> On Tue, Dec 18, 2012 at 22:34:14, Steffen Trumtrar wrote:
> > Add helper to get fb_videomode from devicetree.
> 
> >  drivers/video/fbmon.c |   42 ++++++++++++++++++++++++++++++++++++++++++
> >  include/linux/fb.h    |    4 ++++
> 
> This breaks DaVinci (da8xx_omapl_defconfig), following change was
> required to get it build if OF_VIDEOMODE or/and FB_MODE_HELPERS
> is not defined. There may be better solutions, following was the
> one that was used by me to test this series.
> 
> ---8<----------
> 
> diff --git a/include/linux/fb.h b/include/linux/fb.h
> index 58b9860..0ce30d1 100644
> --- a/include/linux/fb.h
> +++ b/include/linux/fb.h
> @@ -716,9 +716,19 @@ extern void fb_destroy_modedb(struct fb_videomode *modedb);
>  extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb);
>  extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter);
> 
> +#if defined(CONFIG_OF_VIDEOMODE) && defined(CONFIG_FB_MODE_HELPERS)
>  extern int of_get_fb_videomode(struct device_node *np,
>                                struct fb_videomode *fb,
>                                int index);
> +#else
> +static inline int of_get_fb_videomode(struct device_node *np,
> +                                     struct fb_videomode *fb,
> +                                     int index)
> +{
> +       return -EINVAL;
> +}
> +#endif
> +
>  extern int fb_videomode_from_videomode(const struct videomode *vm,
>                                        struct fb_videomode *fbmode);
> 
> ---8<----------
> 

I just did a quick "make da8xx_omapl_defconfig && make" and it builds just fine.
On what version did you apply the series?
At the moment I have the series sitting on 3.7. Didn't try any 3.8-rcx yet.
But fixing this shouldn't be a problem.

> 
> > +#if IS_ENABLED(CONFIG_OF_VIDEOMODE)
> 
> As _OF_VIDEOMODE is a bool type CONFIG, isn't,
> 
> #ifdef CONFIG_OF_VIDEOMODE
> 
> sufficient ?
> 

Yes, that is right. But I think IS_ENABLED is the preferred way to do it, isn't it?

Regards,
Steffen

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2013-01-07  8:06 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 16:57 [PATCHv16 0/7] of: add display helper Steffen Trumtrar
2012-12-18 16:57 ` [PATCHv16 1/7] viafb: rename display_timing to via_display_timing Steffen Trumtrar
2012-12-18 16:57 ` [PATCHv16 2/7] video: add display_timing and videomode Steffen Trumtrar
2012-12-18 16:57 ` [PATCHv16 3/7] video: add of helper for display timings/videomode Steffen Trumtrar
2012-12-18 16:57 ` [PATCHv16 4/7] fbmon: add videomode helpers Steffen Trumtrar
2012-12-18 16:57 ` [PATCHv16 5/7] fbmon: add of_videomode helpers Steffen Trumtrar
2012-12-18 16:57 ` [PATCHv16 6/7] drm_modes: add videomode helpers Steffen Trumtrar
2012-12-18 16:57 ` [PATCHv16 7/7] drm_modes: add of_videomode helpers Steffen Trumtrar
2012-12-18 17:04 ` [PATCHv16 0/7] of: add display helper Steffen Trumtrar
2012-12-18 17:04   ` [PATCHv16 1/7] viafb: rename display_timing to via_display_timing Steffen Trumtrar
2012-12-18 17:04   ` [PATCHv16 2/7] video: add display_timing and videomode Steffen Trumtrar
2012-12-18 17:04   ` [PATCHv16 3/7] video: add of helper for display timings/videomode Steffen Trumtrar
2012-12-18 17:04   ` [PATCHv16 4/7] fbmon: add videomode helpers Steffen Trumtrar
2012-12-18 17:04   ` [PATCHv16 5/7] fbmon: add of_videomode helpers Steffen Trumtrar
     [not found]     ` <1355850256-16135-6-git-send-email-s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-01-07  6:10       ` Mohammed, Afzal
2013-01-07  8:06         ` Steffen Trumtrar [this message]
     [not found]           ` <20130107080648.GB23478-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-01-07  8:46             ` Mohammed, Afzal
2013-01-07 20:06               ` Rob Clark
2013-01-08  5:31                 ` Mohammed, Afzal
2012-12-18 17:04   ` [PATCHv16 6/7] drm_modes: add videomode helpers Steffen Trumtrar
2012-12-18 17:04   ` [PATCHv16 7/7] drm_modes: add of_videomode helpers Steffen Trumtrar
     [not found]   ` <1355850256-16135-1-git-send-email-s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-12-21 15:48     ` [PATCHv16 0/7] of: add display helper Leela Krishna Amudala
2013-01-07  6:23   ` Mohammed, Afzal
2013-01-07  7:46     ` Steffen Trumtrar
2013-01-09 19:12   ` Marek Vasut
2013-01-09 19:39     ` Steffen Trumtrar
2013-01-09 19:56       ` Marek Vasut
2013-01-09 20:15   ` Steffen Trumtrar
     [not found]     ` <20130109201541.GB4780-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-01-09 20:37       ` Thierry Reding
2013-01-09 20:42     ` Laurent Pinchart
2013-01-09 20:59     ` Marek Vasut
2013-01-10  2:52     ` Leela Krishna Amudala
2013-01-10  4:58     ` Mohammed, Afzal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130107080648.GB23478@pengutronix.de \
    --to=s.trumtrar@pengutronix.de \
    --cc=FlorianSchandinat@gmx.de \
    --cc=afzal@ti.com \
    --cc=airlied@linux.ie \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).