[ARM] pxafb: add accelerator ID for PXA3xx GCU
authorDaniel Mack <daniel@caiaq.de>
Thu, 10 Sep 2009 13:26:30 +0000 (15:26 +0200)
committerEric Miao <eric.y.miao@gmail.com>
Fri, 11 Sep 2009 16:16:27 +0000 (00:16 +0800)
Add ID 99 for PXA3xx frame buffers and report it in the pxa frame buffer
conditionally, depending on a new flag in struct pxafb_mach_info.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: linux-fbdev-devel@lists.sourceforge.net
Cc: Dennis Oliver Kropp <dok@directfb.org>
Cc: Sven Neumann <s.neumann@raumfeld.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
arch/arm/mach-pxa/include/mach/pxafb.h
drivers/video/pxafb.c
include/linux/fb.h

index 6932720ba04e39deea7c7f25fdea94316b2feb68..f73061c90b5e438d424affb9daecc3b4a0dd4cb0 100644 (file)
@@ -118,7 +118,8 @@ struct pxafb_mach_info {
        u_int           fixed_modes:1,
                        cmap_inverse:1,
                        cmap_static:1,
-                       unused:29;
+                       acceleration_enabled:1,
+                       unused:28;
 
        /* The following should be defined in LCCR0
         *      LCCR0_Act or LCCR0_Pas          Active or Passive
index 3a002a634ecfe39d3bbfaed172db94d5fc01e62d..1820c4a2443411130bdfab5c8c78cef81942e690 100644 (file)
@@ -2083,6 +2083,9 @@ static int __devinit pxafb_probe(struct platform_device *dev)
                goto failed;
        }
 
+       if (cpu_is_pxa3xx() && inf->acceleration_enabled)
+               fbi->fb.fix.accel = FB_ACCEL_PXA3XX;
+
        fbi->backlight_power = inf->pxafb_backlight_power;
        fbi->lcd_power = inf->pxafb_lcd_power;
 
index f847df9e99b6f4fcd44991e757c1d5b7ca50681a..a34bdf5a9d232e8d6d0c8a1d4efc1d2d069856b4 100644 (file)
@@ -133,6 +133,7 @@ struct dentry;
 #define FB_ACCEL_NEOMAGIC_NM2230 96    /* NeoMagic NM2230              */
 #define FB_ACCEL_NEOMAGIC_NM2360 97    /* NeoMagic NM2360              */
 #define FB_ACCEL_NEOMAGIC_NM2380 98    /* NeoMagic NM2380              */
+#define FB_ACCEL_PXA3XX                 99     /* PXA3xx                       */
 
 #define FB_ACCEL_SAVAGE4        0x80   /* S3 Savage4                   */
 #define FB_ACCEL_SAVAGE3D       0x81   /* S3 Savage3D                  */