On Tue, 19 Feb 2008, Geert Uytterhoeven wrote: > On Tue, 19 Feb 2008, Petr Stehlik wrote: > > Petr Stehlik wrote: > > > Geert Uytterhoeven wrote: > > > > For cfb16 on Falcon I see no direct problems. Perhaps it just failed > > > > because DefaultDepth in /etc/X11/xorg.conf defaults to 24 these days? > > > > > > the problem I faced was that I couldn't *boot* in the 16bit color depth > > > so I > > > *thought* I couldn't run X, or something like that. > > > > IOW, if I set the DefaultDepth to 16 and use the cfb16 driver will it know > > how > > to switch the framebuffer to Falcon truecolor mode? > > Yes it should.
Finally I managed to get fbset and fbtest (from sf.net CVS) through the network into my virtual Atari. I fixed 2 brown paper bag bugs in fbtest, which now works fine in all modes (interleaved bitplanes at 1/2/4/8 bpp and packed pixels at 16 bpp). So in theory, X should work in 16 bpp mode, too. The text console is broken in 16 bpp, as atafb uses the atafb_iplan2p8* drawing operations for both 8 and 16 bpp. The patch below is a first step to fix this, but it doesn't work yet as the cfb_*() routines need valid numbers in fb_fix_screeninfo.line_length, which is not set up by atafb. Oh well, may the all night hackers fix it ;-) --- drivers/video/atafb.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c @@ -2549,6 +2549,13 @@ static void atafb_fillrect(struct fb_inf if (!rect->width || !rect->height) return; +#ifdef ATAFB_FALCON + if (info->var.bits_per_pixel == 16) { + cfb_fillrect(info, rect); + return; + } +#endif + /* * We could use hardware clipping but on many cards you get around * hardware clipping by writing to framebuffer directly. @@ -2583,6 +2590,13 @@ static void atafb_copyarea(struct fb_inf u32 dx, dy, sx, sy, width, height; int rev_copy = 0; +#ifdef ATAFB_FALCON + if (info->var.bits_per_pixel == 16) { + cfb_copyarea(info, area); + return; + } +#endif + /* clip the destination */ x2 = area->dx + area->width; y2 = area->dy + area->height; @@ -2629,6 +2643,13 @@ static void atafb_imageblit(struct fb_in const char *src; u32 dx, dy, width, height, pitch; +#ifdef ATAFB_FALCON + if (info->var.bits_per_pixel == 16) { + cfb_imageblit(info, image); + return; + } +#endif + /* * We could use hardware clipping but on many cards you get around * hardware clipping by writing to framebuffer directly like we are Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]