Patchwork [20/26] ARM: pxa: select FB_PXA on saar and tevorevb

login
register
mail settings
Submitter Eric Miao
Date Oct. 8, 2011, 9:50 a.m.
Message ID <CAMPhdO8ke1M2aFAqzfmFB-MWj6m5JsCYC_zYBC=iSX1L6kWwTw@mail.gmail.com>
Download mbox | patch
Permalink /patch/118514/
State New
Headers show

Comments

Eric Miao - Oct. 8, 2011, 9:50 a.m.
On Sun, Oct 2, 2011 at 4:03 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> The saar and tevorevb platforms call pxafb_smart_flush from board
> code, and that function is defined in the framebuffer code, so it
> cannot be disabled.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-pxa/Kconfig |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
> index bb310d0..cd94f2f 100644
> --- a/arch/arm/mach-pxa/Kconfig
> +++ b/arch/arm/mach-pxa/Kconfig
> @@ -61,11 +61,15 @@ config MACH_TAVOREVB
>        bool "PXA930 Evaluation Board (aka TavorEVB)"
>        select PXA3xx
>        select CPU_PXA930
> +       select FB_PXA
> +       select FB
>
>  config MACH_SAAR
>        bool "PXA930 Handheld Platform (aka SAAR)"
>        select PXA3xx
>        select CPU_PXA930
> +       select FB_PXA
> +       select FB

Hi Arnd,

The option really matters is FB_PXA_SMARTPANEL, which adds support
for the display driver to control an external "smart" LCD panel. And how
about the patch below to fix this - as normal, make empty functions
when not enabled?
Arnd Bergmann - Oct. 8, 2011, 10:07 a.m.
On Saturday 08 October 2011 17:50:31 Eric Miao wrote:
> 
> The option really matters is FB_PXA_SMARTPANEL, which adds support
> for the display driver to control an external "smart" LCD panel. And how
> about the patch below to fix this - as normal, make empty functions
> when not enabled?
> 

Yes, your patch looks better than mine.

Thanks,

	Arnd

Patch

diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h
b/arch/arm/mach-pxa/include/mach/pxafb.h
index 01a45ac..486b4c5 100644
--- a/arch/arm/mach-pxa/include/mach/pxafb.h
+++ b/arch/arm/mach-pxa/include/mach/pxafb.h
@@ -158,5 +158,18 @@  struct pxafb_mach_info {
 void pxa_set_fb_info(struct device *, struct pxafb_mach_info *);
 unsigned long pxafb_get_hsync_time(struct device *dev);

+#ifdef CONFIG_FB_PXA_SMARTPANEL
 extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int);
 extern int pxafb_smart_flush(struct fb_info *info);
+#else
+static inline int pxafb_smart_queue(struct fb_info *info,
+				    uint16_t *cmds, int n)
+{
+	return 0;
+}
+
+static inline int pxafb_smart_flush(struct fb_info *info)
+{
+	return 0;
+}
+#endif
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 0f4e8c9..389530b 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -1309,16 +1309,6 @@  static int pxafb_smart_init(struct pxafb_info *fbi)
 	return 0;
 }
 #else
-int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int n_cmds)
-{
-	return 0;
-}
-
-int pxafb_smart_flush(struct fb_info *info)
-{
-	return 0;
-}
-
 static inline int pxafb_smart_init(struct pxafb_info *fbi) { return 0; }
 #endif /* CONFIG_FB_PXA_SMARTPANEL */