|
From: Jochen R. <jo...@pa...> - 2003-07-15 10:14:21
|
Hi Manty, > I have just made available through the file release system of our > sourceforge project a new patch, it is the 2.4.19-20030625 patch that Jochen > had publised but ported to 2.4.21. I have not ported the IDE patches as IDE > has changed a lot in 2.4.21 and the machine doesn't support it out of the > box. Great. I will see that I take a look at the IDE stuff. I am still on the 2.4.19 kernel at the moment. And a very nice web page, finally -- great job! Based on the setterm command lines you emailed me I was able to see recreate the video non-blanking issue. The old driver was blanking in the default blanking mode, i.e. with 'setterm -powersave off' in effect. I am attaching a patch against the 2.4.19 ns1000 kernel. Also with hard tabs here: http://www.panix.com/~jochen/ns1000/patch-2.4.19-s3trio-blank-20030715.gz It should apply cleanly against 2.4.21 as well, but I have not tried that. Jochen --- linux-2.4.19/drivers/video/s3trio.c.old Tue Jul 15 02:25:17 2003 +++ linux-2.4.19/drivers/video/s3trio.c Tue Jul 15 02:38:24 2003 @@ -769,6 +769,9 @@ { uint8_t v; debug_flow("s3_display_enable %d\n", enable); + if(enable) { + s3_crtc_outb(trio, 0x0d, s3_crtc_inb(trio, 0x0d) & 0x0f); + } /* SR1 is clock mode */ v = s3_seq_inb(trio, 0x01) & 0xdf; if(!enable) @@ -1891,11 +1894,35 @@ static void s3triofbcon_blank(int blank, struct fb_info *info) { triofb_t *trio = (triofb_t*)info; - uint8_t x; - debug_flow("s3triofb_con_blank %d\n", blank); + uint8_t sr1, srd; + debug_msg("s3triofb_con_blank %d\n", blank); + +#if 0 s3_mmio_put8(trio, 0x3c4, 0x1, trio->mmio_regs + 0x03c4); x = s3_mmio_get8(trio, 0x3c5); s3_mmio_put8(trio, 0x3c5, (x & (~0x20)) | (blank << 5), trio->mmio_regs + 0x03c5); +#endif + sr1 = s3_seq_inb(trio, 0x01) & ~0x20; + srd = s3_seq_inb(trio, 0x0d) & 0x0f; + if(blank) { + sr1 |= 0x20; + switch(blank - 1) { + default: + case VESA_NO_BLANKING: + break; + case VESA_VSYNC_SUSPEND: + srd |= 0x40; + break; + case VESA_HSYNC_SUSPEND: + srd |= 0x10; + break; + case VESA_POWERDOWN: + srd |= 0x50; + break; + } + } + s3_seq_outb(trio, 0x0d, srd); + s3_seq_outb(trio, 0x01, sr1); } /* |