From 1417aea53bcd852d4c5a55d4c4a57f6e9441872c Mon Sep 17 00:00:00 2001 From: root Date: Fri, 13 Jun 2008 14:54:07 +0800 Subject: [PATCH] sm502 X800x480 ok. --- Targets/Bonito2fdev/conf/Bonito.2fdev.sm502 | 3 ++- Targets/Bonito2fdev/conf/ld.script | 2 +- fb/cfb_console.c | 8 ++++++++ sys/dev/pci/sm502.c | 2 +- sys/dev/pci/smtc2d.c | 17 +++++++++++++++++ 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/Targets/Bonito2fdev/conf/Bonito.2fdev.sm502 b/Targets/Bonito2fdev/conf/Bonito.2fdev.sm502 index 2b599544..9d2c8c12 100644 --- a/Targets/Bonito2fdev/conf/Bonito.2fdev.sm502 +++ b/Targets/Bonito2fdev/conf/Bonito.2fdev.sm502 @@ -80,7 +80,8 @@ option MY40IO select mod_framebuffer select mod_smi502 # Silicon Motion502 option SMI502 -option X640x480 +#option X640x480 +option X800x480 #option X800x600 #option X1024x768 #option X1280x800 diff --git a/Targets/Bonito2fdev/conf/ld.script b/Targets/Bonito2fdev/conf/ld.script index ba440bf4..6e15b252 100644 --- a/Targets/Bonito2fdev/conf/ld.script +++ b/Targets/Bonito2fdev/conf/ld.script @@ -8,7 +8,7 @@ ENTRY(_start) SECTIONS { - . = 0xffffffff80800000; + . = 0xffffffff88000000; .text : { _ftext = . ; diff --git a/fb/cfb_console.c b/fb/cfb_console.c index 6963f748..7d2bccc6 100644 --- a/fb/cfb_console.c +++ b/fb/cfb_console.c @@ -726,6 +726,9 @@ static void console_scrollup (void) #if (defined(SMI502)||defined(SMI712)) AutodeFillRectModify(CONSOLE_BG_COL); +#ifdef X800x480 + memsetl (CONSOLE_ROW_LAST, CONSOLE_ROW_SIZE >> 2, CONSOLE_BG_COL); +#endif #endif #else @@ -1279,6 +1282,8 @@ static int record = 1; //80*24 #if defined(X640x480) char console_buffer[2][31][81]={32};//80*30->640x480 +#elif defined(X800x480) +char console_buffer[2][37][101]={32}; #elif defined(X800x600) char console_buffer[2][37][101]={32}; #elif defined(X1024x768) @@ -1411,6 +1416,9 @@ int fb_init (unsigned long fbbase,unsigned long iobase) #elif defined(X1024x768) pGD->winSizeX = 1024; pGD->winSizeY = 768; +#elif defined(X800x480) + pGD->winSizeX = 800; + pGD->winSizeY = 480; #else pGD->winSizeX = 640; pGD->winSizeY = 480; diff --git a/sys/dev/pci/sm502.c b/sys/dev/pci/sm502.c index 3804cf87..8cb06407 100644 --- a/sys/dev/pci/sm502.c +++ b/sys/dev/pci/sm502.c @@ -218,7 +218,7 @@ const SMI_REGS init_regs[] = {0x80200, 0x00010000}, {0x000074,0x00020f1f}, #endif -#ifdef X800x600 +#if defined(X800x600)||defined(X800x480) {0x00000004,0x00000000}, //0x00000001 {0x00000048,0x0002180f}, {0x0000004c,0x60120208}, diff --git a/sys/dev/pci/smtc2d.c b/sys/dev/pci/smtc2d.c index aebf95a6..cf75ae69 100644 --- a/sys/dev/pci/smtc2d.c +++ b/sys/dev/pci/smtc2d.c @@ -480,6 +480,16 @@ void AutodeInit() #if defined(CONFIG_VIDEO_32BPP) deInit(800,600,32); #endif +#elif defined(X800x480) +#if defined(CONFIG_VIDEO_8BPP) + deInit(800,480,8); +#endif +#if defined(CONFIG_VIDEO_16BPP) + deInit(800,480,16); +#endif +#if defined(CONFIG_VIDEO_32BPP) + deInit(800,480,32); +#endif #else #if defined(CONFIG_VIDEO_8BPP) @@ -505,6 +515,10 @@ void AutodeFillRectModify(int color) deFillRectModify(0,0,600-16,800,600,color); #endif +#if defined(X800x480) + deFillRectModify(0,0,480-16,800,480,color); +#endif + #if defined(X640x480) deFillRectModify(0,0,480-16,640,480,color); #endif @@ -518,6 +532,9 @@ void AutodeCopyModify(int bpp) #if defined(X800x600) deCopyModify(bpp,0,800,0,16,0,800,0,0,800,600-16,0x0c); #endif +#if defined(X800x480) + deCopyModify(bpp,0,800,0,16,0,800,0,0,800,480-16,0x0c); +#endif #if defined(X640x480) deCopyModify(bpp,0,640,0,16,0,640,0,0,640,480-16,0x0c); #endif