From: <mi...@pr...> - 2004-02-01 20:51:16
|
Update of /cvsroot/gc-linux/linux/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30151/drivers/video Modified Files: gamecubefb.c Log Message: framebuffer now located at the very top of RAM Index: gamecubefb.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/gamecubefb.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gamecubefb.c 29 Jan 2004 23:45:48 -0000 1.4 +++ gamecubefb.c 1 Feb 2004 20:49:19 -0000 1.5 @@ -236,12 +236,12 @@ int video_cmap_len; int i; - gamecubefb_fix.smem_start = 0xd0c00000; gamecubefb_defined.bits_per_pixel = 16; gamecubefb_defined.xres = 640; gamecubefb_defined.yres = 576; gamecubefb_fix.line_length = 640*2; gamecubefb_fix.smem_len = 640*576*2; + gamecubefb_fix.smem_start = (24*1024*1024)-gamecubefb_fix.smem_len; gamecubefb_fix.visual = (gamecubefb_defined.bits_per_pixel == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; @@ -263,7 +263,7 @@ } //MISTFIX - fb_info.screen_base = gamecubefb_fix.smem_start; + //fb_info.screen_base = gamecubefb_fix.smem_start; printk(KERN_INFO "gamecubefb: framebuffer at 0x%lx, mapped to 0x%p, size %dk\n", gamecubefb_fix.smem_start, fb_info.screen_base, gamecubefb_fix.smem_len/1024); @@ -300,7 +300,6 @@ gamecubefb_fix.ywrapstep = (ypan>1) ? 1 : 0; fb_info.fbops = &gamecubefb_ops; - printk("ops set\n"); fb_info.var = gamecubefb_defined; fb_info.fix = gamecubefb_fix; fb_info.pseudo_palette = pseudo_palette; @@ -311,14 +310,35 @@ if (register_framebuffer(&fb_info)<0) return -EINVAL; -#if 0 +volatile static unsigned int *gamecube_video = (unsigned int*) 0xCC002000; +static const unsigned int VIDEO_Mode640X480Pal50YUV16[32] = { +0x11F50101, 0x4B6A01B0, 0x02F85640, 0x00010023, +0x00000024, 0x4D2B4D6D, 0x4D8A4D4C, 0x00435A4E, +0x00000000, 0x00435A4E, 0x00000000, 0x013C0144, +0x113901B1, 0x10010001, 0x00010001, 0x00010001, +0x00000000, 0x00000000, 0x28500100, 0x1AE771F0, +0x0DB4A574, 0x00C1188E, 0xC4C0CBE2, 0xFCECDECF, +0x13130F08, 0x00080C0F, 0x00FF0000, 0x00000000, +0x02800000, 0x000000FF, 0x00FF00FF, 0x00FF00FF}; + + // initialize screen + for(i=0; i<32; i++) { + gamecube_video[i] = VIDEO_Mode640X480Pal50YUV16[i]; + } + gamecube_video[7] = 0x10000000 | (gamecubefb_fix.smem_start>>5); + printk("POKE(%x,%x)\n", &gamecube_video[7], 0x10000000 | (gamecubefb_fix.smem_start>>5)); + gamecube_video[9] = 0x10000000 | ((gamecubefb_fix.smem_start+gamecubefb_fix.line_length)>>5); + printk("POKE(%x,%x)\n", &gamecube_video[9], (gamecubefb_fix.smem_start+gamecubefb_fix.line_length)>>5); + +#if 1 /* clear screen */ int c = 640*576/2; //unsigned long *p = (unsigned long*)fb_info.screen_base; - unsigned long *p = (unsigned long*)gamecubefb_fix.smem_start; + unsigned long *p = (unsigned long*)fb_info.screen_base; while (c--) *p++ = 0x00800080; #endif + printk("Clearing screen at %x\n",fb_info.screen_base); printk(KERN_INFO "fb%d: %s frame buffer device\n", fb_info.node, fb_info.fix.id); |