Skip to contentSkip to conversation

possible cg6 fix for pixels repeating at display edge or fading

PATCH Bob Breuer 3 participants 4 messages Oct 29, 2005 – Nov 5, 2005 Framebuffer layer

lore
Share & tools
lore

Bob Breuer

author
#0 lore raw

Has anyone else using a cg6 seen the color banding or fading and pixels on the right side being repeated off to the edges of the monitor?

I think I've found the cause of the problem. Contrary to the comment, changing the bt->control register affects something other than the cursor. Also, it looks like cg6_bt_init() already sets up the DAC and this chunk of the code may be redundant.

The following patch seems to work for me on a TGX+. If you are seeing problems, can you give this a try and report if it works or not?

Bob

drivers/video/cg6.c renamed from drivers/video/cg6.c.orig +1 -1
@@ -658,7 +658,7 @@ static void cg6_chip_init(struct fb_info
 	/* Disable cursor in Brooktree DAC. */
 	sbus_writel(0x06 << 24, &par->bt->addr);
 	tmp = sbus_readl(&par->bt->control);
-	tmp &= ~(0x03 << 24);
+	tmp |= (0x03 << 24);
 	sbus_writel(tmp, &par->bt->control);
 }
 
#1 lore raw
Quoted 3 lines · On Sat, 29 Oct 2005 16:49:12 -0500 Bob Breuer <[email protected]> wrote:

Has anyone else using a cg6 seen the color banding or fading and pixels on the right side being repeated off to the edges of the monitor?

I'm seeing it as well with a cg6 (501-1672( in an Ultra 1.

Quoted 7 lines

I think I've found the cause of the problem. Contrary to the comment, changing the bt->control register affects something other than the cursor. Also, it looks like cg6_bt_init() already sets up the DAC and this chunk of the code may be redundant.

The following patch seems to work for me on a TGX+. If you are seeing problems, can you give this a try and report if it works or not?

Your patch works for me. The odd coloration of text and pixels on the edges of the screen (was seeing on both left and right here with colorized init scripts) have gone away. Display looks as I'd expect.

Cheers,

Signature · 2 lines
Jason Wever
Gentoo/Sparc Team Co-Lead
#2 lore raw
In reply to Bob Breuer

From: Bob Breuer <[email protected]>
Date: Sat, 29 Oct 2005 16:49:12 -0500

Quoted 10 lines

Has anyone else using a cg6 seen the color banding or fading and pixels on the right side being repeated off to the edges of the monitor?

I think I've found the cause of the problem. Contrary to the comment, changing the bt->control register affects something other than the cursor. Also, it looks like cg6_bt_init() already sets up the DAC and this chunk of the code may be redundant.

The following patch seems to work for me on a TGX+. If you are seeing problems, can you give this a try and report if it works or not?

That register sets the overlay plane, we should just leave it alone since as you correctly noted other code inits that register already.

I'll delete those bogus lines, thanks Bob.

#3 lore raw
In reply to Bob Breuer

From: Bob Breuer <[email protected]>
Date: Sat, 29 Oct 2005 16:49:12 -0500

drivers/video/cg6.c static void cg6_chip_init(struct fb_info · line 663

Quoted 8 lines
drivers/video/cg6.c renamed from drivers/video/cg6.c.orig +1 -1
@@ -658,7 +658,7 @@ static void cg6_chip_init(struct fb_info
 	/* Disable cursor in Brooktree DAC. */
 	sbus_writel(0x06 << 24, &par->bt->addr);
 	tmp = sbus_readl(&par->bt->control);
-	tmp &= ~(0x03 << 24);
+	tmp |= (0x03 << 24);
 	sbus_writel(tmp, &par->bt->control);
 }

BTW, I noticed that the 2.4.x cgsix.c driver does set the bits here instead of clear them. I have no idea why when I moved this code over while writing the 2.6.x driver I changed it to clear the bits :-/