Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Hihn, Jason <Jason.Hihn@ve...> - 2004-04-07 19:50:49
|
I knew you could do it! And I'm glad I was barking up the right tree! (It makes me look like I know my stuff ;-) ) -----Original Message----- From: Jurriaan [mailto:thunder7@...]=20 Sent: Wednesday, April 07, 2004 2:32 PM To: Hihn, Jason Cc: linux-fbdev-users@...; benh@... Subject: Re: [Linux-fbdev-users] radeonfb: strange blue lines after 'setterm -inversescreen on' From: Jurriaan <thunder7@...> Date: Wed, Apr 07, 2004 at 06:33:52PM +0200 > From: Jurriaan <thunder7@...> > Date: Tue, Apr 06, 2004 at 07:52:25PM +0200 > >=20 > > At the moment, I only have Ati and Matrox cards, Ati has the problem, > > Matrox doesn't. I also tested with a 8x16 font, instead of my regular > > 12x22 font, but that didn't make any difference. > >=20 Carefull experimentation, and browsing in the 2.4.25 and xfree86 sources has shown: 1) in radeon_accel.c, calling cfb_fillrect() in radeonfb_fillrect makes the problem go away, but this disables (part of) the accelerated routines. void radeonfb_fillrect(struct fb_info *info, const struct fb_fillrect *region) { struct radeonfb_info *rinfo =3D info->par; struct fb_fillrect modded; int vxres, vyres; if (info->state !=3D FBINFO_STATE_RUNNING) return; - if (radeon_accel_disabled()) { + if (1 || radeon_accel_disabled()) { cfb_fillrect(info, region); return; } 2) in 2.4.25, there is something different about the color handling. In particular, radeonfb.c:rectfill() operates on clr, where clr is defined differently, depending on the color-depth of the display: #ifdef FBCON_HAS_CFB32 static void fbcon_radeon32_clear(struct vc_data *conp, struct display *p, int srcy, int srcx, int height, int width) { struct radeonfb_info *rinfo =3D (struct radeonfb_info *)(p->fb_info); u32 clr; clr =3D ((u32 *)p->dispsw_data)[attr_bgcol_ec(p, conp)]; srcx *=3D fontwidth(p); srcy *=3D fontheight(p); width *=3D fontwidth(p); height *=3D fontheight(p); radeon_rectfill(rinfo, srcy, srcx, height, width, clr); } essentially, p_dispsw_data contains for a given 8-bit color value x x | (x << 8) | (x << 16) | (x << 24) so 0x07 becomes 0x07070707 3) If I adapt 2.6's radeon_accel.c:radeonfb_prim_fillrect() like this: static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo, const struct fb_fillrect *region) { int color; radeon_fifo_wait(4); OUTREG(DP_GUI_MASTER_CNTL, rinfo->dp_gui_master_cntl /* contains, like GMC_DST_32BPP */ | GMC_BRUSH_SOLID_COLOR | ROP3_P); color =3D region->color | (region->color << 8); color =3D color | (color << 16); OUTREG(DP_BRUSH_FRGD_CLR, color); OUTREG(DP_WRITE_MSK, 0xffffffff); OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM)); radeon_fifo_wait(2); OUTREG(DST_Y_X, (region->dy << 16) | region->dx); OUTREG(DST_WIDTH_HEIGHT, (region->width << 16) | region->height); } my problem is solved. Previously, it just read OUTREG(DP_BRUSH_FRGD_CLR, region->color); This is obviously a hack, and only works in 32-bits color.=20 I would be interested in the view of the maintainer. If this is the right solution, do you want a patch that tries to fix this? Thanks everyone for mailing back-and-forth, and testing. Please test if this fixes the problem on your radeon-machine as well, if possible. Jurriaan --=20 And all the while, all the while, I still hear that call To the land of gold and poison that beckons to us all Do you think you're so brave just to go running to that which beckons to us all? New Model Army - Valleys of Green and Grey Debian (Unstable) GNU/Linux 2.6.5-mm1 2x6062 bogomips 0.14 0.11 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck _______________________________________________ Linux-fbdev-users mailing list Linux-fbdev-users@... https://lists.sourceforge.net/lists/listinfo/linux-fbdev-users |