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

From: Eric Miao
Date: Sat Oct 08 2011 - 05:54:15 EST


On Sun, Oct 2, 2011 at 4:03 AM, Arnd Bergmann <arnd@xxxxxxxx> 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@xxxxxxxx>
> ---
> Â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?

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 */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/