* [Patch 01/10] pxafb: More LCCR3 depth defines
[not found] <20080707184000.411913919@datenfreihafen.org>
@ 2008-07-07 18:40 ` stefan
2008-07-08 7:43 ` Eric Miao
2008-07-07 18:40 ` [Patch 02/10] pxafb: Support for RGB666, RGBT666, RGB888 and RGBT888 stefan
1 sibling, 1 reply; 5+ messages in thread
From: stefan @ 2008-07-07 18:40 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: linux-fbdev-devel
[-- Attachment #1: pxafb-add-18+bpp-lccr3.patch --]
[-- Type: text/plain, Size: 1056 bytes --]
Add missing depth definitions to LCCR3.
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
PATCH FOLLOWS
KernelVersion: 2.6-arm-git pxa branch
Index: linux-2.6-arm/include/asm-arm/arch-pxa/regs-lcd.h
===================================================================
--- linux-2.6-arm.orig/include/asm-arm/arch-pxa/regs-lcd.h
+++ linux-2.6-arm/include/asm-arm/arch-pxa/regs-lcd.h
@@ -24,6 +24,12 @@
#define LCCR3_4BPP (2 << 24)
#define LCCR3_8BPP (3 << 24)
#define LCCR3_16BPP (4 << 24)
+#define LCCR3_18BPP (5 << 24)
+#define LCCR3_18BPP_P (6 << 24)
+#define LCCR3_19BPP (7 << 24)
+#define LCCR3_19BPP_P (1 << 29)
+#define LCCR3_24BPP ((1 << 29) | (1 << 24))
+#define LCCR3_25BPP ((1 << 29) | (2 << 24))
#define LCCR3_PDFOR_0 (0 << 30)
#define LCCR3_PDFOR_1 (1 << 30)
--
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Patch 02/10] pxafb: Support for RGB666, RGBT666, RGB888 and RGBT888
[not found] <20080707184000.411913919@datenfreihafen.org>
2008-07-07 18:40 ` [Patch 01/10] pxafb: More LCCR3 depth defines stefan
@ 2008-07-07 18:40 ` stefan
2008-07-08 7:45 ` Eric Miao
1 sibling, 1 reply; 5+ messages in thread
From: stefan @ 2008-07-07 18:40 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: linux-fbdev-devel
[-- Attachment #1: pxafb-18+bpp-modes.patch --]
[-- Type: text/plain, Size: 4617 bytes --]
Add the .depth field to pxafb_mode_info and use it to set pixel data format
as 18(RGB666), 19(RGBT666), 24(RGB888) or 25(RGBT888)
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
PATCH FOLLOWS
KernelVersion: 2.6-arm-git pxa branch
Index: linux-2.6-arm/drivers/video/pxafb.c
===================================================================
--- linux-2.6-arm.orig/drivers/video/pxafb.c
+++ linux-2.6-arm/drivers/video/pxafb.c
@@ -227,6 +227,22 @@
case 4: ret = LCCR3_4BPP; break;
case 8: ret = LCCR3_8BPP; break;
case 16: ret = LCCR3_16BPP; break;
+ case 24:
+ switch (var->red.length + var->green.length +
+ var->blue.length + var->transp.length) {
+ case 18: ret = LCCR3_18BPP_P | LCCR3_PDFOR_3; break;
+ case 19: ret = LCCR3_19BPP_P; break;
+ }
+ break;
+ case 32:
+ switch (var->red.length + var->green.length +
+ var->blue.length + var->transp.length) {
+ case 18: ret = LCCR3_18BPP | LCCR3_PDFOR_3; break;
+ case 19: ret = LCCR3_19BPP; break;
+ case 24: ret = LCCR3_24BPP | LCCR3_PDFOR_3; break;
+ case 25: ret = LCCR3_25BPP; break;
+ }
+ break;
}
return ret;
}
@@ -345,6 +361,41 @@
var->green.offset = 5; var->green.length = 6;
var->blue.offset = 0; var->blue.length = 5;
var->transp.offset = var->transp.length = 0;
+ } else if (var->bits_per_pixel > 16) {
+ struct pxafb_mode_info *mode;
+
+ mode = pxafb_getmode(inf, var);
+ if (!mode)
+ return -EINVAL;
+
+ switch (mode->depth) {
+ case 18: /* RGB666 */
+ var->transp.offset = var->transp.length = 0;
+ var->red.offset = 12; var->red.length = 6;
+ var->green.offset = 6; var->green.length = 6;
+ var->blue.offset = 0; var->blue.length = 6;
+ break;
+ case 19: /* RGBT666 */
+ var->transp.offset = 18; var->transp.length = 1;
+ var->red.offset = 12; var->red.length = 6;
+ var->green.offset = 6; var->green.length = 6;
+ var->blue.offset = 0; var->blue.length = 6;
+ break;
+ case 24: /* RGB888 */
+ var->transp.offset = var->transp.length = 0;
+ var->red.offset = 16; var->red.length = 8;
+ var->green.offset = 8; var->green.length = 8;
+ var->blue.offset = 0; var->blue.length = 8;
+ break;
+ case 25: /* RGBT888 */
+ var->transp.offset = 24; var->transp.length = 1;
+ var->red.offset = 16; var->red.length = 8;
+ var->green.offset = 8; var->green.length = 8;
+ var->blue.offset = 0; var->blue.length = 8;
+ break;
+ default:
+ return -EINVAL;
+ }
} else {
var->red.offset = var->green.offset = 0;
var->blue.offset = var->transp.offset = 0;
@@ -376,7 +427,7 @@
struct pxafb_info *fbi = (struct pxafb_info *)info;
struct fb_var_screeninfo *var = &info->var;
- if (var->bits_per_pixel == 16)
+ if (var->bits_per_pixel >= 16)
fbi->fb.fix.visual = FB_VISUAL_TRUECOLOR;
else if (!fbi->cmap_static)
fbi->fb.fix.visual = FB_VISUAL_PSEUDOCOLOR;
@@ -391,7 +442,7 @@
fbi->fb.fix.line_length = var->xres_virtual *
var->bits_per_pixel / 8;
- if (var->bits_per_pixel == 16)
+ if (var->bits_per_pixel >= 16)
fbi->palette_size = 0;
else
fbi->palette_size = var->bits_per_pixel == 1 ?
@@ -404,7 +455,7 @@
*/
pxafb_set_truecolor(fbi->fb.fix.visual == FB_VISUAL_TRUECOLOR);
- if (fbi->fb.var.bits_per_pixel == 16)
+ if (fbi->fb.var.bits_per_pixel >= 16)
fb_dealloc_cmap(&fbi->fb.cmap);
else
fb_alloc_cmap(&fbi->fb.cmap, 1<<fbi->fb.var.bits_per_pixel, 0);
@@ -831,6 +882,8 @@
case 4:
case 8:
case 16:
+ case 24:
+ case 32:
break;
default:
printk(KERN_ERR "%s: invalid bit depth %d\n",
@@ -968,6 +1021,11 @@
for (gpio = 58; ldd_bits; gpio++, ldd_bits--)
pxa_gpio_mode(gpio | GPIO_ALT_FN_2_OUT);
+ /* 18 bit interface */
+ if (fbi->fb.var.bits_per_pixel > 16) {
+ pxa_gpio_mode(86 | GPIO_ALT_FN_2_OUT);
+ pxa_gpio_mode(87 | GPIO_ALT_FN_2_OUT);
+ }
pxa_gpio_mode(GPIO74_LCD_FCLK_MD);
pxa_gpio_mode(GPIO75_LCD_LCLK_MD);
pxa_gpio_mode(GPIO76_LCD_PCLK_MD);
Index: linux-2.6-arm/include/asm-arm/arch-pxa/pxafb.h
===================================================================
--- linux-2.6-arm.orig/include/asm-arm/arch-pxa/pxafb.h
+++ linux-2.6-arm/include/asm-arm/arch-pxa/pxafb.h
@@ -71,7 +71,8 @@
u_char bpp;
u_int cmap_greyscale:1,
- unused:31;
+ depth:8,
+ unused:23;
/* Parallel Mode Timing */
u_char hsync_len;
--
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch 01/10] pxafb: More LCCR3 depth defines
2008-07-07 18:40 ` [Patch 01/10] pxafb: More LCCR3 depth defines stefan
@ 2008-07-08 7:43 ` Eric Miao
0 siblings, 0 replies; 5+ messages in thread
From: Eric Miao @ 2008-07-08 7:43 UTC (permalink / raw)
To: stefan; +Cc: linux-fbdev-devel, linux-arm-kernel
stefan@datenfreihafen.org wrote:
Acked-by: Eric Miao <eric.miao@marvell.com>
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch 02/10] pxafb: Support for RGB666, RGBT666, RGB888 and RGBT888
2008-07-07 18:40 ` [Patch 02/10] pxafb: Support for RGB666, RGBT666, RGB888 and RGBT888 stefan
@ 2008-07-08 7:45 ` Eric Miao
2008-07-08 20:13 ` Stefan Schmidt
0 siblings, 1 reply; 5+ messages in thread
From: Eric Miao @ 2008-07-08 7:45 UTC (permalink / raw)
To: stefan; +Cc: linux-fbdev-devel, linux-arm-kernel
stefan@datenfreihafen.org wrote:
I'd really like an enumeration type for all the supported bpp + data format,
but for the moment, I think this is acceptable, so
Acked-by: Eric Miao <eric.miao@marvell.com>
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch 02/10] pxafb: Support for RGB666, RGBT666, RGB888 and RGBT888
2008-07-08 7:45 ` Eric Miao
@ 2008-07-08 20:13 ` Stefan Schmidt
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Schmidt @ 2008-07-08 20:13 UTC (permalink / raw)
To: Eric Miao; +Cc: linux-fbdev-devel, linux-arm-kernel
Hello.
On Tue, 2008-07-08 at 15:45, Eric Miao wrote:
> stefan@datenfreihafen.org wrote:
>
> I'd really like an enumeration type for all the supported bpp + data format,
> but for the moment, I think this is acceptable, so
I may be interested in helping out here once I have some more time. Means after
we got the EZX patches ready. I'll come back to you about this.
regards
Stefan Schmidt
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-08 20:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080707184000.411913919@datenfreihafen.org>
2008-07-07 18:40 ` [Patch 01/10] pxafb: More LCCR3 depth defines stefan
2008-07-08 7:43 ` Eric Miao
2008-07-07 18:40 ` [Patch 02/10] pxafb: Support for RGB666, RGBT666, RGB888 and RGBT888 stefan
2008-07-08 7:45 ` Eric Miao
2008-07-08 20:13 ` Stefan Schmidt
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).