You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
(1) |
Apr
(104) |
May
(81) |
Jun
(248) |
Jul
(133) |
Aug
(33) |
Sep
(53) |
Oct
(82) |
Nov
(166) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(121) |
Feb
(42) |
Mar
(39) |
Apr
(84) |
May
(87) |
Jun
(58) |
Jul
(97) |
Aug
(130) |
Sep
(32) |
Oct
(139) |
Nov
(108) |
Dec
(216) |
2003 |
Jan
(299) |
Feb
(136) |
Mar
(392) |
Apr
(141) |
May
(137) |
Jun
(107) |
Jul
(94) |
Aug
(262) |
Sep
(300) |
Oct
(216) |
Nov
(72) |
Dec
(94) |
2004 |
Jan
(174) |
Feb
(192) |
Mar
(215) |
Apr
(314) |
May
(319) |
Jun
(293) |
Jul
(205) |
Aug
(161) |
Sep
(192) |
Oct
(226) |
Nov
(308) |
Dec
(89) |
2005 |
Jan
(127) |
Feb
(269) |
Mar
(588) |
Apr
(106) |
May
(77) |
Jun
(77) |
Jul
(161) |
Aug
(239) |
Sep
(86) |
Oct
(112) |
Nov
(153) |
Dec
(145) |
2006 |
Jan
(87) |
Feb
(57) |
Mar
(129) |
Apr
(109) |
May
(102) |
Jun
(232) |
Jul
(97) |
Aug
(69) |
Sep
(67) |
Oct
(69) |
Nov
(214) |
Dec
(82) |
2007 |
Jan
(133) |
Feb
(307) |
Mar
(121) |
Apr
(171) |
May
(229) |
Jun
(156) |
Jul
(185) |
Aug
(160) |
Sep
(122) |
Oct
(130) |
Nov
(78) |
Dec
(27) |
2008 |
Jan
(105) |
Feb
(137) |
Mar
(146) |
Apr
(148) |
May
(239) |
Jun
(208) |
Jul
(157) |
Aug
(244) |
Sep
(119) |
Oct
(125) |
Nov
(189) |
Dec
(225) |
2009 |
Jan
(157) |
Feb
(139) |
Mar
(106) |
Apr
(130) |
May
(246) |
Jun
(189) |
Jul
(128) |
Aug
(127) |
Sep
(88) |
Oct
(86) |
Nov
(216) |
Dec
(9) |
2010 |
Jan
(5) |
Feb
|
Mar
(11) |
Apr
(31) |
May
(3) |
Jun
|
Jul
(7) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Rogelio M. S. Jr. <ro...@vi...> - 2001-09-04 22:47:05
|
Im confused. You mean going into graphics mode is handled by set_var? Or does "load the mode" mean going into graphic mode? So how should the card initialization go? enable linear mode and map the linear window base somewhere, fill up all the structs then call register_framebuffer? On Tue, 4 Sep 2001, Ani Joshi wrote: > > You don't have to load the mode in your _init() before you cal > register_framebuffer(), the fbcon layer will call you set_var() and set > the mode in there. Some drivers do set it in _init() and some don't, > mostly preference as it will set it twice upon boot anyhow. > > > ani > > On Tue, 4 Sep 2001, Rogelio M. Serrano Jr. wrote: > > > im trying to right an s3 928 framebuffer driver. i have an ibm ps 77s > > with a builtin card with 1MB vram. how do we go to graphics mode on this > > card? should an fb driver enable graphics mode before calling > > register_framebuffer? |
From: Gioele B. <de...@gi...> - 2001-09-04 20:16:42
|
Hi, as first thing I ported the fbutils to autotools. Can someone add me as=20 coder with cvs access (my sf account is "dot")? I'll create a branch for=20 it so I'll not interfer with other patches until everthing is not=20 compiling smooth. --=20 Gioele Barabucci (Gb]) ) mailto:de...@gi... ) http://www.gioelebarabucci.com ) ) I've been and now I've gone ) ) /Magic Pie^Oasis |
From: James S. <jsi...@tr...> - 2001-09-04 16:55:46
|
> > could we somehow detect in register_framebuffer that whe're going > > multihead and disable software scrolling ? > > > > I didn't look at the code so i don't know if it's feasible , just a > > suggestion .. > > Unfortunately once scrollback gets enabled (and allocates its scrollback > buffers, fills couple of pointers here and there), it is not trivial to > disable it again. If someone feels for doing that, do that. But I think > that changing default scrollback value from 32768 to 0 is better - as > you'll still have scrollback if your hardware can do it. I agree for 2.4 kernels the solution Petr stated is the best. It is not easy to properly implement soft scrollback. Sometime ago I worked on a new scrollback implementation that was more in the upper console layers so other systems could take advanatge of it. It is not a easy problem to solve. In the next following weeks I should start working on this again. |
From: <pet...@ph...> - 2001-09-04 12:54:07
|
Hi, I'm using an intel assabet development board on which I swapped the display. The new display is a portait mode display and now I want to present my user interface in lanscape mode. Did somebody did this allready using the framebuffer?? Peter |
From: Rogelio M. S. Jr. <ro...@ev...> - 2001-09-04 09:46:38
|
im trying to right an s3 928 framebuffer driver. i have an ibm ps 77s with a builtin card with 1MB vram. how do we go to graphics mode on this card? should an fb driver enable graphics mode before calling register_framebuffer? |
From: Romain D. <do...@ir...> - 2001-09-04 07:58:04
|
Sven Luther wrote: > That said, does pm3fb + ruby work somewhere ? non :-( > Does it work for you romain with > pm3fb on ppc, or for someone else on i386 ? ruby marche pas sur PPC, et personne n'a essaye sur x86 a part toi... a+ -- DOLBEAU Romain | l'histoire est entierement vraie, puisque ENS Cachan / Ker Lann | je l'ai imaginee d'un bout a l'autre do...@ir... | -- Boris Vian |
From: Petr V. <VAN...@vc...> - 2001-09-03 13:26:20
|
On 3 Sep 01 at 15:15, Ghozlane Toumi wrote: > > You must boot your kernel with 'video=scrollback:0'. Otherwise your > > kernel die sooner or later... JJ's scrollback code does not cope with > > more than one visible console, so you must disable it if you have more > > than one display in the box. > could we somehow detect in register_framebuffer that whe're going > multihead and disable software scrolling ? > > I didn't look at the code so i don't know if it's feasible , just a > suggestion .. Unfortunately once scrollback gets enabled (and allocates its scrollback buffers, fills couple of pointers here and there), it is not trivial to disable it again. If someone feels for doing that, do that. But I think that changing default scrollback value from 32768 to 0 is better - as you'll still have scrollback if your hardware can do it. Best regards, Petr Vandrovec van...@vc... |
From: Ghozlane T. <gt...@me...> - 2001-09-03 13:16:40
|
Monday, September 03, 2001 4:51 PM, You wwrote: > On 3 Sep 01 at 0:25, Benjamin Gilbert wrote: > > [ software scroll back kills on dualhead ] > > You must boot your kernel with 'video=scrollback:0'. Otherwise your > kernel die sooner or later... JJ's scrollback code does not cope with > more than one visible console, so you must disable it if you have more > than one display in the box. > Petr Vandrovec could we somehow detect in register_framebuffer that whe're going multihead and disable software scrolling ? I didn't look at the code so i don't know if it's feasible , just a suggestion .. ghoz |
From: Sven L. <lu...@la...> - 2001-09-02 22:09:02
|
Hello, ... i tried the new pm3fb driver in ruby, from yesterdays CVS, and well, it hanged in the same place. I added some printk's into the __fb_try_mode function, and the last message displayed before the OOPS was SVEN : 19, which is just before the if line : printk ("SVEN : 18\n"); var->vmode = mode->vmode printk ("SVEN : 19\n"); if (info->fbops->fb_check_var) err = info->fbops->fb_check_var(var, info); printk ("SVEN : 20\n"); return !err; } So, i hope this gives you more information to tackle this bug. That said, does pm3fb + ruby work somewhere ? Does it work for you romain with pm3fb on ppc, or for someone else on i386 ? Friendly, Sven Luther |
From: Zapata M. J. L. <jl...@al...> - 2001-09-02 19:10:33
|
hello: i had a SiS 6326 (AGP) working with vesafb with no problems, now i have two video cards: the SiS and an Oak Oti077 SVGA (ISA) wich is not VESA 2.0 compilant How can i make the two video cards work together? In X i use xinerama but XFree86 doesnt has the SVGA server ported to 4.1 so i only get 320x200 in my Oak How can i append=video for multiple boards in LILO? In my BIOS i can switch between PCI and AGP Primary display, but not the ISA, i guess thats why the ISA is always the primary display I have tested to append the vga16 (for the Oak) and vesa (for the SiS) but they are not recognized, i have no /dev/fb* how can i have the to fb working? is it posible? I also want to know if there is a sisfb that can work with my 6326? thanx |
From: Ghozlane T. <gt...@me...> - 2001-09-02 13:26:31
|
Hi, I'd like to know if (in the current 2.4.x) the fbcon layer give the lower-level driver any insurance against concurrent calls to the various fb_functions ? Basicaly, do I have to use locking in order to make sure the video chip is not accessed at the same time ? The video board i'm working on doesn't use irqs so i'm safe on this side ... thanks in advance ghoz |
From: Chris W. <cw...@so...> - 2001-08-30 19:53:09
|
> Hi, > > Sorry for the following stupid questions, :) I am a new comer to the > frame buffer devices of linux, I am supposed to write the frame buffer > device driver for scorpion graphic chip(Motorola MC92110 ) and first > like to play around the frame buffer device like vfb or VESA. Could > anybody point me some simple examples to use this kind of devices, like > draw a line or... > > Thanks in advanced, > > Li Yi Hello! recently, a friend of mine and myself faced a similar challenge. unfortunately, there was no one to answer this, so we forged ahead blindly, and figured out what we could. take a look at gdr.softpixel.com/spurtg for a program that uses framebuffer (we wrote this). download the tarball, and take a look at gfx.c in the src dir. basically, you open the device, call some ioctl's (outlined in linux/fb.h i think), and thats all you need. it helps to mmio it so it becomes a large array. if you need some more help, we can try to help you out. Chris Wright |
From: Li Y. <li...@cr...> - 2001-08-30 03:48:14
|
Hi, Sorry for the following stupid questions, :) I am a new comer to the frame buffer devices of linux, I am supposed to write the frame buffer device driver for scorpion graphic chip(Motorola MC92110 ) and first like to play around the frame buffer device like vfb or VESA. Could anybody point me some simple examples to use this kind of devices, like draw a line or... Thanks in advanced, Li Yi |
From: Helge D. <de...@gm...> - 2001-08-27 07:02:57
|
On Monday 27 August 2001 00:30, Hollis Blanchard wrote: > On Wed, Aug 22, 2001 at 07:06:12PM +0200, Geert Uytterhoeven wrote: > > Since there are still some issues left with the scr_*() functions on > > big-endian platforms that can have both VGA and frame buffer consoles, I > > decided to spent some precious time on auditing the usage of these > > functions. > > Much appreciated. > > For the record, this resolves my problems with VGA console (only; no fb) on > PPC. Previously text written to non-active consoles was endian-reversed. > > If no one has any problems (anyone else tested it?), could this patch > please be committed? For me it looks good too. I just tested it on HP parisc in text- and fb-mode and it worked without any problems. I only had to add a missing semicolon to the patch: linux-2.4.8-ac9/drivers/char/console.c: while (cnt--) { - u16 a = *q; + a = scr_readw(q); a = ((a) & 0x88ff) | (((a) & 0x7000) >> 4) | (((a) & 0x0700) << 4); - *q++ = a; + scr_writew(a, q); + q++ ^^^ here Greetings, Helge |
From: Hollis B. <ho...@au...> - 2001-08-26 22:29:48
|
On Wed, Aug 22, 2001 at 07:06:12PM +0200, Geert Uytterhoeven wrote: > > Since there are still some issues left with the scr_*() functions on > big-endian platforms that can have both VGA and frame buffer consoles, I > decided to spent some precious time on auditing the usage of these functions. Much appreciated. For the record, this resolves my problems with VGA console (only; no fb) on PPC. Previously text written to non-active consoles was endian-reversed. If no one has any problems (anyone else tested it?), could this patch please be committed? -Hollis |
From: Jon M. <jo...@bl...> - 2001-08-24 22:55:59
|
Hello, The following patch adds logo support for CFB2 displays (2 bit grayscale), and also adds a configuration option CONFIG_FB_LOGO to disable the boot logo. -Jon diff -Nur linux-2.4.7-rmk3/drivers/video/Config.in linux-2.4.7-rmk3-bluemug1/drivers/video/Config.in --- linux-2.4.7-rmk3/drivers/video/Config.in Tue Aug 21 10:52:40 2001 +++ linux-2.4.7-rmk3-bluemug1/drivers/video/Config.in Tue Aug 21 11:08:30 2001 @@ -9,6 +9,7 @@ if [ "$CONFIG_FB" = "y" ]; then define_bool CONFIG_DUMMY_CONSOLE y + bool ' Boot logo support' CONFIG_FB_LOGO if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then if [ "$CONFIG_PCI" = "y" ]; then tristate ' nVidia Riva support (EXPERIMENTAL)' CONFIG_FB_RIVA diff -Nur linux-2.4.7-rmk3/drivers/video/fbcon.c linux-2.4.7-rmk3-bluemug1/drivers/video/fbcon.c --- linux-2.4.7-rmk3/drivers/video/fbcon.c Wed Jul 4 22:56:00 2001 +++ linux-2.4.7-rmk3-bluemug1/drivers/video/fbcon.c Tue Aug 21 10:57:58 2001 @@ -646,6 +646,7 @@ nr_cols = p->var.xres/fontwidth(p); nr_rows = p->var.yres/fontheight(p); +#ifdef CONFIG_FB_LOGO if (logo) { /* Need to make room for the logo */ int cnt; @@ -684,6 +685,7 @@ conp->vc_video_erase_char, conp->vc_size_row * logo_lines); } +#endif /* CONFIG_FB_LOGO */ /* * ++guenther: console.c:vc_allocate() relies on initializing @@ -2130,6 +2132,10 @@ int i, j, n, x1, y1, x; int logo_depth, done = 0; +#ifndef CONFIG_FB_LOGO + return 0; +#else + /* Return if the frame buffer is not mapped */ if (!fb) return 0; @@ -2307,6 +2313,34 @@ done = 1; } #endif +#if defined(CONFIG_FBCON_CFB2) + if (depth == 2 && p->type == FB_TYPE_PACKED_PIXELS) { + src = logo; + for( y1 = 0; y1 < LOGO_H; y1++) { + dst = fb + y1*line + x/8; + for( x1 = 0; x1 < LOGO_W/8; x1++) { + u8 a, i; + u8 q = *src++; + q = (q << 4) | (q >> 4); + for (a=0,i=0; i<4; i++) { + a = a << 2; + if (q & 0x1) + a |= 0x3; + q = q >> 1; + } + fb_writeb (a, dst++); + for (a=0,i=0; i<4; i++) { + a = a << 2; + if (q & 0x1) + a |= 0x3; + q = q >> 1; + } + fb_writeb (a, dst++); + } + } + done = 1; + } +#endif #if defined(CONFIG_FBCON_CFB8) || defined(CONFIG_FB_SBUS) if (depth == 8 && p->type == FB_TYPE_PACKED_PIXELS) { /* depth 8 or more, packed, with color registers */ @@ -2438,6 +2472,8 @@ * thing exist in reality?) */ return done ? (LOGO_H + fontheight(p) - 1) / fontheight(p) : 0 ; + +#endif /* CONFIG_FB_LOGO */ } /* |
From: James S. <jsi...@tr...> - 2001-08-24 20:52:13
|
I will be out from this Staurday until the following Sunday. |
From: Olaf H. <ol...@su...> - 2001-08-24 11:06:19
|
On Thu, Aug 23, Olaf Hering wrote: > On Wed, Aug 22, Geert Uytterhoeven wrote: > > > + q++ > > typo :) > > > diff -ur linux-2.4.8-ac9/drivers/video/hgafb.c scr-audit-2.4.8-ac9/drivers/video/hgafb.c > > --- linux-2.4.8-ac9/drivers/video/hgafb.c Mon May 28 11:07:02 2001 > > +++ scr-audit-2.4.8-ac9/drivers/video/hgafb.c Wed Aug 22 18:48:32 2001 > > @@ -203,7 +203,7 @@ > > fillchar = 0x00; > > spin_unlock_irqrestore(&hga_reg_lock, flags); > > if (fillchar != 0xbf) > > - memset((char *)hga_vram_base, fillchar, hga_vram_len); > > + isa_memset_io((char *)hga_vram_base, fillchar, hga_vram_len); > > } > > > > > > @@ -279,7 +279,8 @@ > > char *logo = linux_logo_bw; > > for (y = 134; y < 134 + 80 ; y++) /* this needs some cleanup */ > > for (x = 0; x < 10 ; x++) > > - *(dest + (y%4)*8192 + (y>>2)*90 + x + 40) = ~*(logo++); > > + isa_writeb(~*(logo++), > > + (dest + (y%4)*8192 + (y>>2)*90 + x + 40)); > > } --- hgafb.c Thu Aug 23 23:19:58 2001 +++ drivers/video/hgafb.c Fri Aug 24 13:02:57 2001 @@ -203,7 +203,7 @@ fillchar = 0x00; spin_unlock_irqrestore(&hga_reg_lock, flags); if (fillchar != 0xbf) - isa_memset_io((char *)hga_vram_base, fillchar, hga_vram_len); + isa_memset_io(hga_vram_base, fillchar, hga_vram_len); } @@ -280,7 +280,7 @@ for (y = 134; y < 134 + 80 ; y++) /* this needs some cleanup */ for (x = 0; x < 10 ; x++) isa_writeb(~*(logo++), - (dest + (y%4)*8192 + (y>>2)*90 + x + 40)); + *(dest + (y%4)*8192 + (y>>2)*90 + x + 40)); } #endif /* MODULE */ Anyone with a hercules card around? Do they still work? Gruss Olaf -- $ man clone BUGS Main feature not yet implemented... |
From: Olaf H. <ol...@su...> - 2001-08-23 21:11:49
|
On Wed, Aug 22, Geert Uytterhoeven wrote: > + q++ typo :) > diff -ur linux-2.4.8-ac9/drivers/video/hgafb.c scr-audit-2.4.8-ac9/drivers/video/hgafb.c > --- linux-2.4.8-ac9/drivers/video/hgafb.c Mon May 28 11:07:02 2001 > +++ scr-audit-2.4.8-ac9/drivers/video/hgafb.c Wed Aug 22 18:48:32 2001 > @@ -203,7 +203,7 @@ > fillchar = 0x00; > spin_unlock_irqrestore(&hga_reg_lock, flags); > if (fillchar != 0xbf) > - memset((char *)hga_vram_base, fillchar, hga_vram_len); > + isa_memset_io((char *)hga_vram_base, fillchar, hga_vram_len); > } > > > @@ -279,7 +279,8 @@ > char *logo = linux_logo_bw; > for (y = 134; y < 134 + 80 ; y++) /* this needs some cleanup */ > for (x = 0; x < 10 ; x++) > - *(dest + (y%4)*8192 + (y>>2)*90 + x + 40) = ~*(logo++); > + isa_writeb(~*(logo++), > + (dest + (y%4)*8192 + (y>>2)*90 + x + 40)); > } That expands to static void hga_show_logo(void) { int x, y; char *dest = (char *)hga_vram_base; char *logo = linux_logo_bw; for (y = 134; y < 134 + 80 ; y++) for (x = 0; x < 10 ; x++) (*(volatile unsigned char *) ((void *)( ((char *)(((unsigned long)(0xC0000000) ) )) + ( (dest + (y%4)*8192 + (y>>2)*90 + x + 40) ) )) = ( ~*(logo++) )) ; } drivers/video/hgafb.c: In function `hga_show_logo': drivers/video/hgafb.c:297: invalid operands to binary + I have no idea how to fix that... its a 2.4.9 tree, but I think that makes no difference. Gruss Olaf -- $ man clone BUGS Main feature not yet implemented... |
From: Ani J. <aj...@sh...> - 2001-08-23 17:02:13
|
I have also seen this "meltdown" on the LCD display. It happens when I write the cursor image to the last 1024 bytes of the framebuffer, I moved this offset to 10kb earler and it works fine. I think there might be a hardware bug in the LT Pro chipset which prevents any (cursor) data being placed in the last kb of the fb. This is odd because every other mach64 does this fine and I believe atyfb also does this... ani On Thu, 23 Aug 2001, Michael D. Crawford wrote: > I have a laptop with an ATI Rage Mobility video chip in it. I'd like to write > the necessary code to have it work fully in accellerated mode under the Linux > framebuffer. I'd also like to get DRM for accellerated 3D working with it under > X (for which I'll address a similar question to the appropriate list). > > You can read about my laptop at http://www.goingware.com/laptop/ > > I can use the framebuffer just fine using the Vesa2 driver or the Mach64 > framebuffer driver using this line in my lilo.conf: > > append="ide0=autotune ide1=autotune video=atyfb:1024x768,font:SUN12x22" > > But when I enable accelleration in the framebuffer, the most amazing and > frightening looking meltdown happens to my LCD display. It makes one want to > press the power off key quickly before it melts into a puddle. (I haven't > checked in the latest kernel versions, but this was the case up to 2.4.3 or so.) > > I think I'm capable of writing the necessary code but I don't have the specs and > I don't know where to start. Does anyone have the specs for this chip? Can you > give me tips on how to proceed? > > I'm not sure which PCI device is my video chip but here's the list of all of > them: > > # lspci -n > 00:00.0 Class 0600: 8086:7190 (rev 03) > 00:01.0 Class 0604: 8086:7191 (rev 03) > 00:07.0 Class 0601: 8086:7110 (rev 02) > 00:07.1 Class 0101: 8086:7111 (rev 01) > 00:07.2 Class 0c03: 8086:7112 (rev 01) > 00:07.3 Class 0680: 8086:7113 (rev 03) > 00:09.0 Class 0780: 11c1:0441 (rev 01) > 00:0a.0 Class 0607: 104c:ac1e > 00:11.0 Class 0401: 125d:1969 (rev 02) > 00:12.0 Class 0200: 1011:0019 (rev 41) > 01:00.0 Class 0300: 1002:4c42 (rev dc) > > Here's the relevant lines from my X log file: > > (--) PCI:*(1:0:0) ATI Mach64 LB rev 220, Mem @ 0xfd000000/24, 0xfecfe000/12, I/O > @ 0xe800/8 > ... > (--) ATI(0): ATI 3D Rage LT Pro graphics controller detected. > (--) ATI(0): Chip type 4C42 "LB", version 4, foundry UMC, class 0, revision > 0x03. > (--) ATI(0): AGP bus interface detected; block I/O base is 0xE800. > (--) ATI(0): ATI Mach64 adapter detected. > (--) ATI(0): Internal RAMDAC (subtype 1) detected. > > Thanks for your help. Warmest regards, > > Mike Crawford > -- > Michael D. Crawford > GoingWare Inc. - Expert Software Development and Consulting > http://www.goingware.com > cra...@go... > > Tilting at Windmills for a Better Tomorrow. > > _______________________________________________ > Linux-fbdev-devel mailing list > Lin...@li... > http://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel > |
From: Geert U. <ge...@li...> - 2001-08-23 10:09:58
|
On Thu, 23 Aug 2001, Romain Dolbeau wrote: > Geert Uytterhoeven wrote: > > Since there are still some issues left with the scr_*() functions on > > big-endian platforms that can have both VGA and frame buffer consoles, I > > decided to spent some precious time on auditing the usage of these functions. > > >From a driver author point of view, where are those functions > useful ? My understanding is they should only be used in _putcs, > when accessing the [unsigned short *] parameter that contain the > character data. Is that right ? (pm3fb need to be fixed :-( ) Yes, that's right. A frame buffer device just has to draw characters from a passed screen buffer in its putcs() routine. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... 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 |
From: Romain D. <do...@ir...> - 2001-08-23 08:32:10
|
Geert Uytterhoeven wrote: > Since there are still some issues left with the scr_*() functions on > big-endian platforms that can have both VGA and frame buffer consoles, I > decided to spent some precious time on auditing the usage of these functions. >From a driver author point of view, where are those functions useful ? My understanding is they should only be used in _putcs, when accessing the [unsigned short *] parameter that contain the character data. Is that right ? (pm3fb need to be fixed :-( ) TIA -- DOLBEAU Romain | l'histoire est entierement vraie, puisque ENS Cachan / Ker Lann | je l'ai imaginee d'un bout a l'autre do...@ir... | -- Boris Vian |
From: Michael D. C. <cra...@go...> - 2001-08-23 04:25:29
|
I have a laptop with an ATI Rage Mobility video chip in it. I'd like to write the necessary code to have it work fully in accellerated mode under the Linux framebuffer. I'd also like to get DRM for accellerated 3D working with it under X (for which I'll address a similar question to the appropriate list). You can read about my laptop at http://www.goingware.com/laptop/ I can use the framebuffer just fine using the Vesa2 driver or the Mach64 framebuffer driver using this line in my lilo.conf: append="ide0=autotune ide1=autotune video=atyfb:1024x768,font:SUN12x22" But when I enable accelleration in the framebuffer, the most amazing and frightening looking meltdown happens to my LCD display. It makes one want to press the power off key quickly before it melts into a puddle. (I haven't checked in the latest kernel versions, but this was the case up to 2.4.3 or so.) I think I'm capable of writing the necessary code but I don't have the specs and I don't know where to start. Does anyone have the specs for this chip? Can you give me tips on how to proceed? I'm not sure which PCI device is my video chip but here's the list of all of them: # lspci -n 00:00.0 Class 0600: 8086:7190 (rev 03) 00:01.0 Class 0604: 8086:7191 (rev 03) 00:07.0 Class 0601: 8086:7110 (rev 02) 00:07.1 Class 0101: 8086:7111 (rev 01) 00:07.2 Class 0c03: 8086:7112 (rev 01) 00:07.3 Class 0680: 8086:7113 (rev 03) 00:09.0 Class 0780: 11c1:0441 (rev 01) 00:0a.0 Class 0607: 104c:ac1e 00:11.0 Class 0401: 125d:1969 (rev 02) 00:12.0 Class 0200: 1011:0019 (rev 41) 01:00.0 Class 0300: 1002:4c42 (rev dc) Here's the relevant lines from my X log file: (--) PCI:*(1:0:0) ATI Mach64 LB rev 220, Mem @ 0xfd000000/24, 0xfecfe000/12, I/O @ 0xe800/8 ... (--) ATI(0): ATI 3D Rage LT Pro graphics controller detected. (--) ATI(0): Chip type 4C42 "LB", version 4, foundry UMC, class 0, revision 0x03. (--) ATI(0): AGP bus interface detected; block I/O base is 0xE800. (--) ATI(0): ATI Mach64 adapter detected. (--) ATI(0): Internal RAMDAC (subtype 1) detected. Thanks for your help. Warmest regards, Mike Crawford -- Michael D. Crawford GoingWare Inc. - Expert Software Development and Consulting http://www.goingware.com cra...@go... Tilting at Windmills for a Better Tomorrow. |
From: Geert U. <ge...@li...> - 2001-08-22 17:11:30
|
Hi, Since there are still some issues left with the scr_*() functions on big-endian platforms that can have both VGA and frame buffer consoles, I decided to spent some precious time on auditing the usage of these functions. Screen buffers contain characters/attribute pairs. You may not access a screen buffer directly, only through the scr_*() functions!! On systems with VGA text, scr_*() should convert the character/attribute pair to/from the hardware VGA text format, which is little endian. On systems with frame buffer consoles, the exact format doesn't matter (unless support for VGA text is compiled in), but simple stores/loads give best performance. (Note: this opens a nice way to debug scr_*() usage on a frame buffer console: just let scr_{read,write}w() (un)mangle the data, so you immediately see when something goes wrong). List of functions that were audited (i.e. all usage of these routines was checked): - scr_*() operations: o scr_readw(): read from a screen buffer o scr_writew(): write to a screen buffer o scr_memcpyw(): copy between screen buffers o scr_memcpyw_from(): copy from a screen buffer to a buffer in native format o scr_memcpyw_to(): copy from a buffer in native format to a screen buffer o scr_memmovew(): move between screen buffers o scr_memsetw(): screen buffer fill - Routines or macros having parameters or results pointing to screen buffers (some are unsigned long instead of unsigned short *): o consw.con_invert_region() o consw.con_putcs() o consw.con_screen_pos() o consw.con_getxy() o display_switch.putcs o drivers/video/mdacon.c:MDA_ADDR() o drivers/char/console.c:screenpos() o drivers/video/promcon.c:promcon_repaint_line() o drivers/char/console.c:do_update_region() o drivers/char/console.c:vcs_scr_readw() o drivers/char/console.c:vcs_scr_writew() o drivers/char/console.c:screen_pos() o drivers/char/console.c:update_region() - Variables pointing to screen buffers (some are unsigned long instead of unsigned short *): o drivers/video/fbcon.c:softback_{buf,curr,in,top,end} o drivers/video/vgacon.c:vga_vram_{base,end} o drivers/video/mdacon.c:mda_vram_base o drivers/video/hgafb.c:hga_vram_base o vc_data.vc_origin (and origin, if #include "console_macros.h") o vc_data.vc_pos (and pos, if #include "console_macros.h") o vc_data.vc_scr_end (and scr_end, if #include "console_macros.h") o vc_data.vc_screenbuf (and screenbuf, if #include "console_macros.h") o vc_data.vc_translate (and translate, if #include "console_macros.h") o vc_data.vc_visible_origin (and visible_origin, if #include "console_macros.h") List of fixes: - Accesses to screen buffers must use the correct scr_*() routines. BTW, it turns out scr_memcpyw_{from,to} are no longer used. - Hgafb ISA memory space fixes: o Use isa_memset_io() instead of memset() o Use isa_writeb() instead of pointer dereferencing - Sticon*: consw.con_screen_pos() and consw.con_getxy() must not return zero. Use a NULL function pointer instead, to indicate that these functions are not available. - Optimizations: o avoid multiple scr_readw(s) for identical s o fbcon_riva{8,16,32}_putcs(): attr is invariant of the character loop Note: I did not look at arch-specific implementations of the scr_*() operations. The patch is against 2.4.8-ac9, but it should apply to any recent tree (including 2.4.9). Caveat: the patch is completely untested, except for human brain processing. All comments are welcome. Sorry for delays in responding to comments. diff -ur linux-2.4.8-ac9/drivers/char/console.c scr-audit-2.4.8-ac9/drivers/char/console.c --- linux-2.4.8-ac9/drivers/char/console.c Fri Jun 29 11:01:19 2001 +++ scr-audit-2.4.8-ac9/drivers/char/console.c Wed Aug 22 18:48:32 2001 @@ -399,20 +399,28 @@ else { u16 *q = p; int cnt = count; + u16 a; if (!can_do_color) { - while (cnt--) *q++ ^= 0x0800; + while (cnt--) { + a = scr_readw(q); + a ^= 0x0800; + scr_writew(a, q); + q++; + } } else if (hi_font_mask == 0x100) { while (cnt--) { - u16 a = *q; + a = scr_readw(q); a = ((a) & 0x11ff) | (((a) & 0xe000) >> 4) | (((a) & 0x0e00) << 4); - *q++ = a; + scr_writew(a, q); + q++; } } else { while (cnt--) { - u16 a = *q; + a = scr_readw(q); a = ((a) & 0x88ff) | (((a) & 0x7000) >> 4) | (((a) & 0x0700) << 4); - *q++ = a; + scr_writew(a, q); + q++ } } } diff -ur linux-2.4.8-ac9/drivers/video/cgsixfb.c scr-audit-2.4.8-ac9/drivers/video/cgsixfb.c --- linux-2.4.8-ac9/drivers/video/cgsixfb.c Thu Feb 22 08:29:07 2001 +++ scr-audit-2.4.8-ac9/drivers/video/cgsixfb.c Wed Aug 22 18:48:32 2001 @@ -362,13 +362,15 @@ unsigned long flags; int i, x, y; u8 *fd1, *fd2, *fd3, *fd4; + u16 c; spin_lock_irqsave(&fb->lock, flags); do { i = sbus_readl(&fbc->s); } while (i & 0x10000000); - sbus_writel(attr_fgcol(p, scr_readw(s)), &fbc->fg); - sbus_writel(attr_bgcol(p, scr_readw(s)), &fbc->bg); + c = scr_readw(s); + sbus_writel(attr_fgcol(p, c), &fbc->fg); + sbus_writel(attr_bgcol(p, c), &fbc->bg); sbus_writel(0x140000, &fbc->mode); sbus_writel(0xe880fc30, &fbc->alu); sbus_writel(~0, &fbc->pixelm); diff -ur linux-2.4.8-ac9/drivers/video/creatorfb.c scr-audit-2.4.8-ac9/drivers/video/creatorfb.c --- linux-2.4.8-ac9/drivers/video/creatorfb.c Wed Jun 13 07:42:20 2001 +++ scr-audit-2.4.8-ac9/drivers/video/creatorfb.c Wed Aug 22 18:48:32 2001 @@ -475,11 +475,13 @@ unsigned long flags; int i, xy; u8 *fd1, *fd2, *fd3, *fd4; + u16 c; u64 fgbg; spin_lock_irqsave(&fb->lock, flags); - fgbg = (((u64)(((u32 *)p->dispsw_data)[attr_fgcol(p,scr_readw(s))])) << 32) | - ((u32 *)p->dispsw_data)[attr_bgcol(p,scr_readw(s))]; + c = scr_readw(s); + fgbg = (((u64)(((u32 *)p->dispsw_data)[attr_fgcol(p, c)])) << 32) | + ((u32 *)p->dispsw_data)[attr_bgcol(p, c)]; if (fgbg != *(u64 *)&fb->s.ffb.fg_cache) { FFBFifo(fb, 2); upa_writeq(fgbg, &fbc->fg); diff -ur linux-2.4.8-ac9/drivers/video/dn_cfb8.c scr-audit-2.4.8-ac9/drivers/video/dn_cfb8.c --- linux-2.4.8-ac9/drivers/video/dn_cfb8.c Mon Feb 19 10:37:00 2001 +++ scr-audit-2.4.8-ac9/drivers/video/dn_cfb8.c Wed Aug 22 18:48:32 2001 @@ -518,7 +518,7 @@ underl = attr_underline(p,conp); while (count--) { - c = *s++; + c = scr_readw(s++); dest = dest0++; cdat = p->fontdata+c*p->fontheight; for (rows = p->fontheight; rows--; dest += p->next_line) { diff -ur linux-2.4.8-ac9/drivers/video/fbcon-afb.c scr-audit-2.4.8-ac9/drivers/video/fbcon-afb.c --- linux-2.4.8-ac9/drivers/video/fbcon-afb.c Tue Jul 25 03:24:25 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-afb.c Wed Aug 22 18:48:32 2001 @@ -290,8 +290,9 @@ int fg0, bg0, fg, bg; dest0 = p->screen_base+yy*fontheight(p)*p->next_line+xx; - fg0 = attr_fgcol(p, scr_readw(s)); - bg0 = attr_bgcol(p, scr_readw(s)); + c1 = scr_readw(s); + fg0 = attr_fgcol(p, c1); + bg0 = attr_bgcol(p, c1); while (count--) if (xx&3 || count < 3) { /* Slow version */ diff -ur linux-2.4.8-ac9/drivers/video/fbcon-cfb16.c scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb16.c --- linux-2.4.8-ac9/drivers/video/fbcon-cfb16.c Tue Jul 25 03:24:25 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb16.c Wed Aug 22 18:48:32 2001 @@ -178,8 +178,9 @@ u32 eorx, fgx, bgx; dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 2; - fgx = ((u16 *)p->dispsw_data)[attr_fgcol(p, scr_readw(s))]; - bgx = ((u16 *)p->dispsw_data)[attr_bgcol(p, scr_readw(s))]; + c = scr_readw(s); + fgx = ((u16 *)p->dispsw_data)[attr_fgcol(p, c)]; + bgx = ((u16 *)p->dispsw_data)[attr_bgcol(p, c)]; fgx |= (fgx << 16); bgx |= (bgx << 16); eorx = fgx ^ bgx; diff -ur linux-2.4.8-ac9/drivers/video/fbcon-cfb2.c scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb2.c --- linux-2.4.8-ac9/drivers/video/fbcon-cfb2.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb2.c Wed Aug 22 18:48:32 2001 @@ -154,8 +154,9 @@ u32 eorx, fgx, bgx; dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * 2; - fgx=3/*attr_fgcol(p,scr_readw(s))*/; - bgx=attr_bgcol(p,scr_readw(s)); + c = scr_readw(s); + fgx = 3/*attr_fgcol(p, c)*/; + bgx = attr_bgcol(p, c); fgx |= (fgx << 2); fgx |= (fgx << 4); bgx |= (bgx << 2); diff -ur linux-2.4.8-ac9/drivers/video/fbcon-cfb24.c scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb24.c --- linux-2.4.8-ac9/drivers/video/fbcon-cfb24.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb24.c Wed Aug 22 18:48:32 2001 @@ -191,8 +191,9 @@ u32 eorx, fgx, bgx, d1, d2, d3, d4; dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 3; - fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p, scr_readw(s))]; - bgx = ((u32 *)p->dispsw_data)[attr_bgcol(p, scr_readw(s))]; + c = scr_readw(s); + fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p, c)]; + bgx = ((u32 *)p->dispsw_data)[attr_bgcol(p, c)]; eorx = fgx ^ bgx; while (count--) { c = scr_readw(s++) & p->charmask; diff -ur linux-2.4.8-ac9/drivers/video/fbcon-cfb32.c scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb32.c --- linux-2.4.8-ac9/drivers/video/fbcon-cfb32.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb32.c Wed Aug 22 18:48:32 2001 @@ -164,8 +164,9 @@ u32 eorx, fgx, bgx, *pt; dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p) * 4; - fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p, scr_readw(s))]; - bgx = ((u32 *)p->dispsw_data)[attr_bgcol(p, scr_readw(s))]; + c = scr_readw(s); + fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p, c)]; + bgx = ((u32 *)p->dispsw_data)[attr_bgcol(p, c)]; eorx = fgx ^ bgx; while (count--) { c = scr_readw(s++) & p->charmask; diff -ur linux-2.4.8-ac9/drivers/video/fbcon-cfb4.c scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb4.c --- linux-2.4.8-ac9/drivers/video/fbcon-cfb4.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb4.c Wed Aug 22 18:48:32 2001 @@ -156,8 +156,9 @@ u32 eorx, fgx, bgx; dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * 4; - fgx=attr_fgcol(p,scr_readw(s)); - bgx=attr_bgcol(p,scr_readw(s)); + c = scr_readw(s); + fgx = attr_fgcol(p, c); + bgx = attr_bgcol(p, c); fgx |= (fgx << 4); fgx |= (fgx << 8); fgx |= (fgx << 16); diff -ur linux-2.4.8-ac9/drivers/video/fbcon-cfb8.c scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb8.c --- linux-2.4.8-ac9/drivers/video/fbcon-cfb8.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-cfb8.c Wed Aug 22 18:48:32 2001 @@ -163,8 +163,9 @@ u32 eorx, fgx, bgx; dest0 = p->screen_base + yy * fontheight(p) * bytes + xx * fontwidth(p); - fgx=attr_fgcol(p,scr_readw(s)); - bgx=attr_bgcol(p,scr_readw(s)); + c = scr_readw(s); + fgx = attr_fgcol(p, c); + bgx = attr_bgcol(p, c); fgx |= (fgx << 8); fgx |= (fgx << 16); bgx |= (bgx << 8); diff -ur linux-2.4.8-ac9/drivers/video/fbcon-hga.c scr-audit-2.4.8-ac9/drivers/video/fbcon-hga.c --- linux-2.4.8-ac9/drivers/video/fbcon-hga.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-hga.c Wed Aug 22 18:48:32 2001 @@ -148,9 +148,10 @@ u8 d; u16 c; - bold = attr_bold(p,scr_readw(s)); - revs = attr_reverse(p,scr_readw(s)); - underl = attr_underline(p,scr_readw(s)); + c = scr_readw(s); + bold = attr_bold(p, c); + revs = attr_reverse(p, c); + underl = attr_underline(p, c); y0 = yy*fontheight(p); while (count--) { diff -ur linux-2.4.8-ac9/drivers/video/fbcon-ilbm.c scr-audit-2.4.8-ac9/drivers/video/fbcon-ilbm.c --- linux-2.4.8-ac9/drivers/video/fbcon-ilbm.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-ilbm.c Wed Aug 22 18:48:32 2001 @@ -154,8 +154,9 @@ int fg0, bg0, fg, bg; dest0 = p->screen_base+yy*fontheight(p)*p->next_line+xx; - fg0 = attr_fgcol(p,scr_readw(s)); - bg0 = attr_bgcol(p,scr_readw(s)); + c1 = scr_readw(s); + fg0 = attr_fgcol(p, c1); + bg0 = attr_bgcol(p, c1); while (count--) if (xx&3 || count < 3) { /* Slow version */ diff -ur linux-2.4.8-ac9/drivers/video/fbcon-iplan2p2.c scr-audit-2.4.8-ac9/drivers/video/fbcon-iplan2p2.c --- linux-2.4.8-ac9/drivers/video/fbcon-iplan2p2.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-iplan2p2.c Wed Aug 22 18:48:32 2001 @@ -364,8 +364,9 @@ else dest0 = (p->screen_base + yy * bytes * fontheight(p) + (xx>>1)*4 + (xx & 1)); - fgx = expand2w(COLOR_2P(attr_fgcol(p,scr_readw(s)))); - bgx = expand2w(COLOR_2P(attr_bgcol(p,scr_readw(s)))); + c = scr_readw(s); + fgx = expand2w(COLOR_2P(attr_fgcol(p, c))); + bgx = expand2w(COLOR_2P(attr_bgcol(p, c))); eorx = fgx ^ bgx; while (count--) { diff -ur linux-2.4.8-ac9/drivers/video/fbcon-iplan2p4.c scr-audit-2.4.8-ac9/drivers/video/fbcon-iplan2p4.c --- linux-2.4.8-ac9/drivers/video/fbcon-iplan2p4.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-iplan2p4.c Wed Aug 22 18:48:32 2001 @@ -374,8 +374,9 @@ else dest0 = (p->screen_base + yy * bytes * fontheight(p) + (xx>>1)*8 + (xx & 1)); - fgx = expand4l(attr_fgcol(p,scr_readw(s))); - bgx = expand4l(attr_bgcol(p,scr_readw(s))); + c = scr_readw(s); + fgx = expand4l(attr_fgcol(p, c)); + bgx = expand4l(attr_bgcol(p, c)); eorx = fgx ^ bgx; while (count--) { diff -ur linux-2.4.8-ac9/drivers/video/fbcon-iplan2p8.c scr-audit-2.4.8-ac9/drivers/video/fbcon-iplan2p8.c --- linux-2.4.8-ac9/drivers/video/fbcon-iplan2p8.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-iplan2p8.c Wed Aug 22 18:48:32 2001 @@ -407,8 +407,9 @@ dest0 = (p->screen_base + yy * bytes * fontheight(p) + (xx>>1)*16 + (xx & 1)); - expand8dl(attr_fgcol(p,scr_readw(s)), &fgx1, &fgx2); - expand8dl(attr_bgcol(p,scr_readw(s)), &bgx1, &bgx2); + c = scr_readw(s); + expand8dl(attr_fgcol(p, c), &fgx1, &fgx2); + expand8dl(attr_bgcol(p, c), &bgx1, &bgx2); eorx1 = fgx1 ^ bgx1; eorx2 = fgx2 ^ bgx2; while (count--) { diff -ur linux-2.4.8-ac9/drivers/video/fbcon-mfb.c scr-audit-2.4.8-ac9/drivers/video/fbcon-mfb.c --- linux-2.4.8-ac9/drivers/video/fbcon-mfb.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-mfb.c Wed Aug 22 18:48:32 2001 @@ -117,9 +117,10 @@ u16 c; dest0 = p->screen_base+yy*fontheight(p)*p->next_line+xx; - bold = attr_bold(p,scr_readw(s)); - revs = attr_reverse(p,scr_readw(s)); - underl = attr_underline(p,scr_readw(s)); + c = scr_readw(s); + bold = attr_bold(p, c); + revs = attr_reverse(p, c); + underl = attr_underline(p, c); while (count--) { c = scr_readw(s++) & p->charmask; diff -ur linux-2.4.8-ac9/drivers/video/fbcon-sti.c scr-audit-2.4.8-ac9/drivers/video/fbcon-sti.c --- linux-2.4.8-ac9/drivers/video/fbcon-sti.c Mon Feb 19 10:04:58 2001 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-sti.c Wed Aug 22 18:48:32 2001 @@ -257,9 +257,10 @@ return; } - bold = attr_bold(p,scr_readw(s)); - revs = attr_reverse(p,scr_readw(s)); - underl = attr_underline(p,scr_readw(s)); + c = scr_readw(s); + bold = attr_bold(p, c); + revs = attr_reverse(p, c); + underl = attr_underline(p, c); while (count--) { c = scr_readw(s++) & p->charmask; diff -ur linux-2.4.8-ac9/drivers/video/fbcon-vga-planes.c scr-audit-2.4.8-ac9/drivers/video/fbcon-vga-planes.c --- linux-2.4.8-ac9/drivers/video/fbcon-vga-planes.c Tue Jul 25 03:24:26 2000 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon-vga-planes.c Wed Aug 22 18:48:32 2001 @@ -236,8 +236,9 @@ void fbcon_ega_planes_putcs(struct vc_data *conp, struct display *p, const unsigned short *s, int count, int yy, int xx) { - int fg = attr_fgcol(p,scr_readw(s)); - int bg = attr_bgcol(p,scr_readw(s)); + u16 c = scr_readw(s); + int fg = attr_fgcol(p, c); + int bg = attr_bgcol(p, c); char *where; int n; @@ -274,8 +275,9 @@ void fbcon_vga_planes_putcs(struct vc_data *conp, struct display *p, const unsigned short *s, int count, int yy, int xx) { - int fg = attr_fgcol(p,*s); - int bg = attr_bgcol(p,*s); + u16 c = scr_readw(s); + int fg = attr_fgcol(p, c); + int bg = attr_bgcol(p, c); char *where; int n; @@ -295,7 +297,7 @@ wmb(); for (n = 0; n < count; n++) { int y; - int c = *s++ & p->charmask; + int c = scr_readw(s++) & p->charmask; u8 *cdat = p->fontdata + (c & p->charmask) * fontheight(p); for (y = 0; y < fontheight(p); y++, cdat++) { diff -ur linux-2.4.8-ac9/drivers/video/fbcon.c scr-audit-2.4.8-ac9/drivers/video/fbcon.c --- linux-2.4.8-ac9/drivers/video/fbcon.c Fri Mar 23 08:17:54 2001 +++ scr-audit-2.4.8-ac9/drivers/video/fbcon.c Wed Aug 22 18:48:32 2001 @@ -664,7 +664,7 @@ scr_memsetw(save, conp->vc_video_erase_char, logo_lines * nr_cols * 2); r = q - step; for (cnt = 0; cnt < logo_lines; cnt++, r += i) - scr_memcpyw_from(save + cnt * nr_cols, r, 2 * i); + scr_memcpyw(save + cnt * nr_cols, r, 2 * i); r = q; } } @@ -682,7 +682,7 @@ } scr_memsetw((unsigned short *)conp->vc_origin, conp->vc_video_erase_char, - conp->vc_size_row * logo_lines); + conp->vc_size_row * logo_lines); } /* @@ -2010,17 +2010,14 @@ static void fbcon_invert_region(struct vc_data *conp, u16 *p, int cnt) { while (cnt--) { + u16 a = scr_readw(p); if (!conp->vc_can_do_color) - *p++ ^= 0x0800; - else if (conp->vc_hi_font_mask == 0x100) { - u16 a = *p; + a ^= 0x0800; + else if (conp->vc_hi_font_mask == 0x100) a = ((a) & 0x11ff) | (((a) & 0xe000) >> 4) | (((a) & 0x0e00) << 4); - *p++ = a; - } else { - u16 a = *p; + else a = ((a) & 0x88ff) | (((a) & 0x7000) >> 4) | (((a) & 0x0700) << 4); - *p++ = a; - } + scr_writew(a, p++); if (p == (u16 *)softback_end) p = (u16 *)softback_buf; if (p == (u16 *)softback_in) diff -ur linux-2.4.8-ac9/drivers/video/hgafb.c scr-audit-2.4.8-ac9/drivers/video/hgafb.c --- linux-2.4.8-ac9/drivers/video/hgafb.c Mon May 28 11:07:02 2001 +++ scr-audit-2.4.8-ac9/drivers/video/hgafb.c Wed Aug 22 18:48:32 2001 @@ -203,7 +203,7 @@ fillchar = 0x00; spin_unlock_irqrestore(&hga_reg_lock, flags); if (fillchar != 0xbf) - memset((char *)hga_vram_base, fillchar, hga_vram_len); + isa_memset_io((char *)hga_vram_base, fillchar, hga_vram_len); } @@ -279,7 +279,8 @@ char *logo = linux_logo_bw; for (y = 134; y < 134 + 80 ; y++) /* this needs some cleanup */ for (x = 0; x < 10 ; x++) - *(dest + (y%4)*8192 + (y>>2)*90 + x + 40) = ~*(logo++); + isa_writeb(~*(logo++), + (dest + (y%4)*8192 + (y>>2)*90 + x + 40)); } #endif /* MODULE */ diff -ur linux-2.4.8-ac9/drivers/video/leofb.c scr-audit-2.4.8-ac9/drivers/video/leofb.c --- linux-2.4.8-ac9/drivers/video/leofb.c Thu Feb 22 08:29:07 2001 +++ scr-audit-2.4.8-ac9/drivers/video/leofb.c Wed Aug 22 18:48:32 2001 @@ -285,14 +285,16 @@ unsigned long flags; int i, x, y; u8 *fd1, *fd2, *fd3, *fd4; + u16 c; u32 *u; spin_lock_irqsave(&fb->lock, flags); do { i = sbus_readl(&us->csr); } while (i & 0x20000000); - sbus_writel(attr_fgcol(p,scr_readw(s)) << 24, &ss->fg); - sbus_writel(attr_bgcol(p,scr_readw(s)) << 24, &ss->bg); + c = scr_readw(s); + sbus_writel(attr_fgcol(p, c) << 24, &ss->fg); + sbus_writel(attr_bgcol(p, c) << 24, &ss->bg); sbus_writel(0xFFFFFFFF<<(32-fontwidth(p)), &us->fontmsk); if (fontwidthlog(p)) x = (xx << fontwidthlog(p)); diff -ur linux-2.4.8-ac9/drivers/video/matrox/matroxfb_accel.c scr-audit-2.4.8-ac9/drivers/video/matrox/matroxfb_accel.c --- linux-2.4.8-ac9/drivers/video/matrox/matroxfb_accel.c Wed Jun 20 11:06:14 2001 +++ scr-audit-2.4.8-ac9/drivers/video/matrox/matroxfb_accel.c Wed Aug 22 18:48:32 2001 @@ -654,13 +654,15 @@ #ifdef FBCON_HAS_CFB8 static void matrox_cfb8_putcs(struct vc_data* conp, struct display* p, const unsigned short* s, int count, int yy, int xx) { + u_int16_t c; u_int32_t fgx, bgx; MINFO_FROM_DISP(p); DBG_HEAVY("matroxfb_cfb8_putcs"); - fgx = attr_fgcol(p, scr_readw(s)); - bgx = attr_bgcol(p, scr_readw(s)); + c = scr_readw(s); + fgx = attr_fgcol(p, c); + bgx = attr_bgcol(p, c); fgx |= (fgx << 8); fgx |= (fgx << 16); bgx |= (bgx << 8); @@ -671,13 +673,15 @@ #ifdef FBCON_HAS_CFB16 static void matrox_cfb16_putcs(struct vc_data* conp, struct display* p, const unsigned short* s, int count, int yy, int xx) { + u_int16_t c; u_int32_t fgx, bgx; MINFO_FROM_DISP(p); DBG_HEAVY("matroxfb_cfb16_putcs"); - fgx = ((u_int16_t*)p->dispsw_data)[attr_fgcol(p, scr_readw(s))]; - bgx = ((u_int16_t*)p->dispsw_data)[attr_bgcol(p, scr_readw(s))]; + c = scr_readw(s); + fgx = ((u_int16_t*)p->dispsw_data)[attr_fgcol(p, c)]; + bgx = ((u_int16_t*)p->dispsw_data)[attr_bgcol(p, c)]; fgx |= (fgx << 16); bgx |= (bgx << 16); ACCESS_FBINFO(curr.putcs)(fgx, bgx, p, s, count, yy, xx); @@ -686,13 +690,15 @@ #if defined(FBCON_HAS_CFB32) || defined(FBCON_HAS_CFB24) static void matrox_cfb32_putcs(struct vc_data* conp, struct display* p, const unsigned short* s, int count, int yy, int xx) { + u_int16_t c; u_int32_t fgx, bgx; MINFO_FROM_DISP(p); DBG_HEAVY("matroxfb_cfb32_putcs"); - fgx = ((u_int32_t*)p->dispsw_data)[attr_fgcol(p, scr_readw(s))]; - bgx = ((u_int32_t*)p->dispsw_data)[attr_bgcol(p, scr_readw(s))]; + c = scr_readw(s); + fgx = ((u_int32_t*)p->dispsw_data)[attr_fgcol(p, c)]; + bgx = ((u_int32_t*)p->dispsw_data)[attr_bgcol(p, c)]; ACCESS_FBINFO(curr.putcs)(fgx, bgx, p, s, count, yy, xx); } #endif @@ -900,12 +906,14 @@ unsigned int offs; unsigned int attr; unsigned int step; + u_int16_t c; CRITFLAGS MINFO_FROM_DISP(p); step = ACCESS_FBINFO(devflags.textstep); offs = yy * p->next_line + xx * step; - attr = attr_fgcol(p, scr_readw(s)) | (attr_bgcol(p, scr_readw(s)) << 4); + c = scr_readw(s); + attr = attr_fgcol(p, c) | (attr_bgcol(p, c) << 4); CRITBEGIN diff -ur linux-2.4.8-ac9/drivers/video/newport_con.c scr-audit-2.4.8-ac9/drivers/video/newport_con.c --- linux-2.4.8-ac9/drivers/video/newport_con.c Mon Oct 16 21:53:18 2000 +++ scr-audit-2.4.8-ac9/drivers/video/newport_con.c Wed Aug 22 18:48:32 2001 @@ -359,7 +359,7 @@ int charattr; unsigned char *p; - charattr = (*s >> 8) & 0xff; + charattr = (scr_readw(s) >> 8) & 0xff; xpos <<= 3; ypos <<= 4; @@ -378,7 +378,7 @@ NPORT_DMODE0_L32); for (i = 0; i < count; i++, xpos += 8) { - p = &FONT_DATA[(s[i] & 0xff) << 4]; + p = &FONT_DATA[(scr_readw(s++) & 0xff) << 4]; newport_wait(); diff -ur linux-2.4.8-ac9/drivers/video/promcon.c scr-audit-2.4.8-ac9/drivers/video/promcon.c --- linux-2.4.8-ac9/drivers/video/promcon.c Mon Feb 19 10:37:00 2001 +++ scr-audit-2.4.8-ac9/drivers/video/promcon.c Wed Aug 22 18:48:32 2001 @@ -51,27 +51,30 @@ { unsigned short *s = (unsigned short *) (conp->vc_origin + py * conp->vc_size_row + (px << 1)); + u16 cs; + cs = scr_readw(s); if (px == pw) { unsigned short *t = s - 1; + u16 ct = scr_readw(t); - if (inverted(*s) && inverted(*t)) - return sprintf(b, "\b\033[7m%c\b\033[@%c\033[m", - *s, *t); - else if (inverted(*s)) - return sprintf(b, "\b\033[7m%c\033[m\b\033[@%c", - *s, *t); - else if (inverted(*t)) - return sprintf(b, "\b%c\b\033[@\033[7m%c\033[m", - *s, *t); + if (inverted(cs) && inverted(ct)) + return sprintf(b, "\b\033[7m%c\b\033[@%c\033[m", cs, + ct); + else if (inverted(cs)) + return sprintf(b, "\b\033[7m%c\033[m\b\033[@%c", cs, + ct); + else if (inverted(ct)) + return sprintf(b, "\b%c\b\033[@\033[7m%c\033[m", cs, + ct); else - return sprintf(b, "\b%c\b\033[@%c", *s, *t); + return sprintf(b, "\b%c\b\033[@%c", cs, ct); } - if (inverted(*s)) - return sprintf(b, "\033[7m%c\033[m\b", *s); + if (inverted(cs)) + return sprintf(b, "\033[7m%c\033[m\b", cs); else - return sprintf(b, "%c\b", *s); + return sprintf(b, "%c\b", cs); } static int @@ -80,27 +83,30 @@ unsigned short *s = (unsigned short *) (conp->vc_origin + py * conp->vc_size_row + (px << 1)); char *p = b; + u16 cs; b += sprintf(b, "\033[%d;%dH", py + 1, px + 1); + cs = scr_readw(s); if (px == pw) { unsigned short *t = s - 1; + u16 ct = scr_readw(t); - if (inverted(*s) && inverted(*t)) - b += sprintf(b, "\b%c\b\033[@\033[7m%c\033[m", *s, *t); - else if (inverted(*s)) - b += sprintf(b, "\b%c\b\033[@%c", *s, *t); - else if (inverted(*t)) - b += sprintf(b, "\b\033[7m%c\b\033[@%c\033[m", *s, *t); + if (inverted(cs) && inverted(ct)) + b += sprintf(b, "\b%c\b\033[@\033[7m%c\033[m", cs, ct); + else if (inverted(cs)) + b += sprintf(b, "\b%c\b\033[@%c", cs, ct); + else if (inverted(ct)) + b += sprintf(b, "\b\033[7m%c\b\033[@%c\033[m", cs, ct); else - b += sprintf(b, "\b\033[7m%c\033[m\b\033[@%c", *s, *t); + b += sprintf(b, "\b\033[7m%c\033[m\b\033[@%c", cs, ct); return b - p; } - if (inverted(*s)) - b += sprintf(b, "%c\b", *s); + if (inverted(cs)) + b += sprintf(b, "%c\b", cs); else - b += sprintf(b, "\033[7m%c\033[m\b", *s); + b += sprintf(b, "\033[7m%c\033[m\b", cs); return b - p; } @@ -206,8 +212,9 @@ unsigned char *b = *bp; while (cnt--) { - if (attr != inverted(*s)) { - attr = inverted(*s); + u16 c = scr_readw(s); + if (attr != inverted(c)) { + attr = inverted(c); if (attr) { strcpy (b, "\033[7m"); b += 4; @@ -216,7 +223,8 @@ b += 3; } } - *b++ = *s++; + *b++ = c; + s++; if (b - buf >= 224) { promcon_puts(buf, b - buf); b = buf; @@ -246,9 +254,9 @@ if (x + count >= pw + 1) { if (count == 1) { x -= 1; - save = *(unsigned short *)(conp->vc_origin + save = scr_readw((unsigned short *)(conp->vc_origin + y * conp->vc_size_row - + (x << 1)); + + (x << 1))); if (px != x || py != y) { b += sprintf(b, "\033[%d;%dH", y + 1, x + 1); diff -ur linux-2.4.8-ac9/drivers/video/riva/accel.c scr-audit-2.4.8-ac9/drivers/video/riva/accel.c --- linux-2.4.8-ac9/drivers/video/riva/accel.c Mon Feb 19 10:37:00 2001 +++ scr-audit-2.4.8-ac9/drivers/video/riva/accel.c Wed Aug 22 18:48:32 2001 @@ -207,10 +207,11 @@ xx *= fontwidth(p); yy *= fontheight(p); + c = scr_readw(s); + fgx = attr_fgcol(p, c); + bgx = attr_bgcol(p, c); while (count--) { c = scr_readw(s++); - fgx = attr_fgcol(p,c); - bgx = attr_bgcol(p,c); fbcon_riva_writechr(conp, p, c, fgx, bgx, yy, xx); xx += fontwidth(p); } @@ -321,12 +322,13 @@ xx *= fontwidth(p); yy *= fontheight(p); + c = scr_readw(s); + fgx = ((u16 *)p->dispsw_data)[attr_fgcol(p, c)]; + bgx = ((u16 *)p->dispsw_data)[attr_bgcol(p, c)]; + if (p->var.green.length == 6) + convert_bgcolor_16(&bgx); while (count--) { c = scr_readw(s++); - fgx = ((u16 *)p->dispsw_data)[attr_fgcol(p,c)]; - bgx = ((u16 *)p->dispsw_data)[attr_bgcol(p,c)]; - if (p->var.green.length == 6) - convert_bgcolor_16(&bgx); fbcon_riva_writechr(conp, p, c, fgx, bgx, yy, xx); xx += fontwidth(p); } @@ -396,10 +398,11 @@ xx *= fontwidth(p); yy *= fontheight(p); + c = scr_readw(s); + fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p, c)]; + bgx = ((u32 *)p->dispsw_data)[attr_bgcol(p, c)]; while (count--) { c = scr_readw(s++); - fgx = ((u32 *)p->dispsw_data)[attr_fgcol(p,c)]; - bgx = ((u32 *)p->dispsw_data)[attr_bgcol(p,c)]; fbcon_riva_writechr(conp, p, c, fgx, bgx, yy, xx); xx += fontwidth(p); } diff -ur linux-2.4.8-ac9/drivers/video/sticon-bmode.c scr-audit-2.4.8-ac9/drivers/video/sticon-bmode.c --- linux-2.4.8-ac9/drivers/video/sticon-bmode.c Mon Feb 19 10:04:59 2001 +++ scr-audit-2.4.8-ac9/drivers/video/sticon-bmode.c Wed Aug 22 18:48:32 2001 @@ -318,7 +318,7 @@ int count, int ypos, int xpos) { while(count--) { - sti_putc(&default_sti, *s++, ypos, xpos++); + sti_putc(&default_sti, scr_readw(s++), ypos, xpos++); } } @@ -402,16 +402,6 @@ return 0; } -static u16 *sticon_screen_pos(struct vc_data *conp, int offset) -{ - return NULL; -} - -static unsigned long sticon_getxy(struct vc_data *conp, unsigned long pos, int *px, int *py) -{ - return 0; -} - static u8 sticon_build_attr(struct vc_data *conp, u8 color, u8 intens, u8 blink, u8 underline, u8 reverse) { u8 attr = ((color & 0x70) >> 1) | ((color & 7)); @@ -440,11 +430,7 @@ con_set_palette: sticon_set_palette, con_scrolldelta: sticon_scrolldelta, con_set_origin: sticon_set_origin, - con_save_screen: NULL, con_build_attr: sticon_build_attr, - con_invert_region: NULL, - con_screen_pos: sticon_screen_pos, - con_getxy: sticon_getxy, }; #include <asm/pgalloc.h> /* need cache flush routines */ diff -ur linux-2.4.8-ac9/drivers/video/sticon.c scr-audit-2.4.8-ac9/drivers/video/sticon.c --- linux-2.4.8-ac9/drivers/video/sticon.c Tue Dec 5 21:29:39 2000 +++ scr-audit-2.4.8-ac9/drivers/video/sticon.c Wed Aug 22 18:48:32 2001 @@ -86,7 +86,7 @@ int count, int ypos, int xpos) { while(count--) { - sti_putc(&default_sti, *s++, ypos, xpos++); + sti_putc(&default_sti, scr_readw(s++), ypos, xpos++); } } @@ -170,16 +170,6 @@ return 0; } -static u16 *sticon_screen_pos(struct vc_data *conp, int offset) -{ - return NULL; -} - -static unsigned long sticon_getxy(struct vc_data *conp, unsigned long pos, int *px, int *py) -{ - return 0; -} - static u8 sticon_build_attr(struct vc_data *conp, u8 color, u8 intens, u8 blink, u8 underline, u8 reverse) { u8 attr = ((color & 0x70) >> 1) | ((color & 7)); @@ -208,11 +198,7 @@ con_set_palette: sticon_set_palette, con_scrolldelta: sticon_scrolldelta, con_set_origin: sticon_set_origin, - con_save_screen: NULL, con_build_attr: sticon_build_attr, - con_invert_region: NULL, - con_screen_pos: sticon_screen_pos, - con_getxy: sticon_getxy, }; static int __init sti_init(void) diff -ur linux-2.4.8-ac9/drivers/video/tdfxfb.c scr-audit-2.4.8-ac9/drivers/video/tdfxfb.c --- linux-2.4.8-ac9/drivers/video/tdfxfb.c Wed Aug 8 11:51:07 2001 +++ scr-audit-2.4.8-ac9/drivers/video/tdfxfb.c Wed Aug 22 18:48:32 2001 @@ -1088,27 +1088,27 @@ struct display* p, const unsigned short *s,int count,int yy,int xx) { - u32 fgx,bgx; - fgx=attr_fgcol(p, *s); - bgx=attr_bgcol(p, *s); + u16 c = scr_readw(s); + u32 fgx = attr_fgcol(p, c); + u32 bgx = attr_bgcol(p, c); do_putcs( fgx,bgx,p,s,count,yy,xx ); } static void tdfx_cfb16_putcs(struct vc_data* conp, struct display* p, const unsigned short *s,int count,int yy,int xx) { - u32 fgx,bgx; - fgx=((u16*)p->dispsw_data)[attr_fgcol(p,*s)]; - bgx=((u16*)p->dispsw_data)[attr_bgcol(p,*s)]; + u16 c = scr_readw(s); + u32 fgx = ((u16*)p->dispsw_data)[attr_fgcol(p, c)]; + u32 bgx = ((u16*)p->dispsw_data)[attr_bgcol(p, c)]; do_putcs( fgx,bgx,p,s,count,yy,xx ); } static void tdfx_cfb32_putcs(struct vc_data* conp, struct display* p, const unsigned short *s,int count,int yy,int xx) { - u32 fgx,bgx; - fgx=((u32*)p->dispsw_data)[attr_fgcol(p,*s)]; - bgx=((u32*)p->dispsw_data)[attr_bgcol(p,*s)]; + u16 c = scr_readw(s); + u32 fgx = ((u32*)p->dispsw_data)[attr_fgcol(p, c)]; + u32 bgx = ((u32*)p->dispsw_data)[attr_bgcol(p, c)]; do_putcs( fgx,bgx,p,s,count,yy,xx ); } diff -ur linux-2.4.8-ac9/drivers/video/vgacon.c scr-audit-2.4.8-ac9/drivers/video/vgacon.c --- linux-2.4.8-ac9/drivers/video/vgacon.c Mon Feb 19 10:37:01 2001 +++ scr-audit-2.4.8-ac9/drivers/video/vgacon.c Wed Aug 22 18:48:32 2001 @@ -486,7 +486,7 @@ vga_video_num_columns = c->vc_cols; vga_video_num_lines = c->vc_rows; if (!vga_is_gfx) - scr_memcpyw_to((u16 *) c->vc_origin, (u16 *) c->vc_screenbuf, c->vc_screenbuf_size); + scr_memcpyw((u16 *) c->vc_origin, (u16 *) c->vc_screenbuf, c->vc_screenbuf_size); return 0; /* Redrawing not needed */ } @@ -977,7 +977,7 @@ c->vc_y = ORIG_Y; } if (!vga_is_gfx) - scr_memcpyw_from((u16 *) c->vc_screenbuf, (u16 *) c->vc_origin, c->vc_screenbuf_size); + scr_memcpyw((u16 *) c->vc_screenbuf, (u16 *) c->vc_origin, c->vc_screenbuf_size); } static int vgacon_scroll(struct vc_data *c, int t, int b, int dir, int lines) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... 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 |
From: Geert U. <ge...@li...> - 2001-08-21 07:37:51
|
---------- Forwarded message ---------- Date: Tue, 21 Aug 2001 10:35:26 +0900 From: sslee <ss...@mm...> To: ge...@li... Subject: Graphics hardware Hellow. I thank for your Graphics hardware. I study frame buffer and want to implement video driver using frame buffer. But I don't know about video(graphic) hardware. I want know structure of video H/W and operation. how does data flow from main memory to monitor and what is 2D, 3D accelerator, what is graphic engine..... I step first to video driver using frame buffer. My major is not graphic hardware. So It is difficult for me to find books or document to discribe video hardware. Would you recommend books or document with which I am able to understand video(graphic)H/W ?. Have a good day. Bye |