video: add PXA3xx accelerator ID [v2]

Started by Daniel Mack on Sep 10, 2009 · 5 messages from 3 authors · Last reply Sep 11, 2009

STALE6292d

open the first message on its own page

  1. [PATCH] video: add PXA3xx accelerator ID [v2]
    Related patches
  2. [PATCH] video: add PXA3xx accelerator ID [v2]
    Related patches
  3. [PATCH] video: add PXA3xx accelerator ID [v2]
    Related patches
  4. [PATCH] video: add PXA3xx accelerator ID [v2]
    Related patches
Message details and related content
Ok, here goes a new patch as just discussed.
Does that look good to everyone?

Thanks,
Daniel

From 32b1fa824cd78f9ba6169b90c5d01870de05c86f Mon Sep 17 00:00:00 2001
From: Daniel Mack <redacted>
Date: Mon, 20 Jul 2009 11:18:43 +0200
Subject: [PATCH] video: add PXA3xx accelerator ID

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 <redacted>
Cc: Eric Miao <redacted>
Cc: <redacted>
Cc: Dennis Oliver Kropp <redacted>
Cc: Sven Neumann <redacted>
---
 arch/arm/mach-pxa/include/mach/pxafb.h |    3 ++-
 drivers/video/pxafb.c                  |    3 +++
 include/linux/fb.h                     |    1 +
 3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/arch/arm/mach-pxa/include/mach/pxafb.h
index 6932720..f73061c 100644
--- a/arch/arm/mach-pxa/include/mach/pxafb.h
+++ b/arch/arm/mach-pxa/include/mach/pxafb.h
@@ -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
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 3951cc5..b65cc2d 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -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;
 
diff --git a/include/linux/fb.h b/include/linux/fb.h
index f847df9..a34bdf5 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -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                  */
-- 
1.6.3.3
Message details and related content
On Thu, 10 Sep 2009, Daniel Mack wrote:
quoted hunk
Ok, here goes a new patch as just discussed.
Does that look good to everyone?

Thanks,
Daniel
quoted
From 32b1fa824cd78f9ba6169b90c5d01870de05c86f Mon Sep 17 00:00:00 2001
From: Daniel Mack <redacted>
Date: Mon, 20 Jul 2009 11:18:43 +0200
Subject: [PATCH] video: add PXA3xx accelerator ID

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 <redacted>
Cc: Eric Miao <redacted>
Cc: <redacted>
Cc: Dennis Oliver Kropp <redacted>
Cc: Sven Neumann <redacted>
---
 arch/arm/mach-pxa/include/mach/pxafb.h |    3 ++-
 drivers/video/pxafb.c                  |    3 +++
 include/linux/fb.h                     |    1 +
 3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/arch/arm/mach-pxa/include/mach/pxafb.h
index 6932720..f73061c 100644
--- a/arch/arm/mach-pxa/include/mach/pxafb.h
+++ b/arch/arm/mach-pxa/include/mach/pxafb.h
@@ -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
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c

10 more quoted lines

Ok, now remove 'cpu_is_pxa3xx() && ' above and you should be good to go:-) 
What if tomorrow pxa4xx comes (ok, Eric will disagree, but wtill:-))
quoted hunk
 	fbi->backlight_power = inf->pxafb_backlight_power;
 	fbi->lcd_power = inf->pxafb_lcd_power;
 
diff --git a/include/linux/fb.h b/include/linux/fb.h
index f847df9..a34bdf5 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -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                  */
-- 
1.6.3.3
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
Message details and related content
On Thu, Sep 10, 2009 at 03:31:34PM +0200, Guennadi Liakhovetski wrote:
quoted
+	if (cpu_is_pxa3xx() && inf->acceleration_enabled)
+		fbi->fb.fix.accel = FB_ACCEL_PXA3XX;
+
Ok, now remove 'cpu_is_pxa3xx() && ' above and you should be good to go:-) 
What if tomorrow pxa4xx comes (ok, Eric will disagree, but wtill:-))
Don't know. I left it in there intentionally, but I'm fine to remove it.
Or Eric does it when applying ;) Eric?

Daniel
Message details and related content
On Thu, Sep 10, 2009 at 03:33:27PM +0200, Daniel Mack wrote:
On Thu, Sep 10, 2009 at 03:31:34PM +0200, Guennadi Liakhovetski wrote:
quoted
quoted
+	if (cpu_is_pxa3xx() && inf->acceleration_enabled)
+		fbi->fb.fix.accel = FB_ACCEL_PXA3XX;
+
Ok, now remove 'cpu_is_pxa3xx() && ' above and you should be good to go:-) 
What if tomorrow pxa4xx comes (ok, Eric will disagree, but wtill:-))
Don't know. I left it in there intentionally, but I'm fine to remove it.
Or Eric does it when applying ;) Eric?
What I was considering are cases where a kernel binary that works on
both PXA3xx and other PXAs shares the same pxafb_mach_info struct across
different board support code. The accel flag would then be set for wrong
platforms.

But this might be academic, that's why I don't have a strong opinion on
that :)

Daniel


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Message details and related content
Ok, now remove 'cpu_is_pxa3xx() && ' above and you should be good to go:-)
What if tomorrow pxa4xx comes (ok, Eric will disagree, but wtill:-))
It is not likely to be pxa4xx, (chinese people don't like '4', and there are
a lot chinese in Marvell, Shhh..... don't let them know I said this ;-)

Still, I guess having a cpu_is_pxa3xx() should be OK here.
quoted
      fbi->backlight_power = inf->pxafb_backlight_power;
      fbi->lcd_power = inf->pxafb_lcd_power;
diff --git a/include/linux/fb.h b/include/linux/fb.h
index f847df9..a34bdf5 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -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                  */
--
1.6.3.3
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help