linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rivafb sync polarity problem?
@ 2003-01-19 12:55 Fredrik Noring
  2003-01-19 16:25 ` Antonino Daplas
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Fredrik Noring @ 2003-01-19 12:55 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Ani Joshi

Hi,

It seems the mode below doesn't work with rivafb in Linux 2.4.21-pre2,
the RGB (TV) screen fail to sync properly. (The equivalent modeline in
XFree86 4.2 works.)

    mode "768x288"
        geometry   768 288   768 288   32
        timings    62500   120 80   20 2   54 2
        hsync low
        vsync low
    endmode

I suspect it may have something to do with the sync polarity, as it
does not seem to be implemented fully in the rivafb driver? (Then again,
it seems the polarity always is forced low by the driver, I'm not sure.)

Looking at http://web.inter.nl.net/hcc/S.Weijgers/FreeVGA/vga/extreg.htm
and reading XFree86 source code indicate it should be fairly simple to
solve this, given that the correct bits are set/cleared of course. :)

The patch below tries to set the proper polarity. The mode still doesn't
work though, since misc_output already is 0xEB by default. I don't know
if the patch is wrong or which additional problems the rivafb driver
might have with the mode.

Any ideas?

Thanks

	Fredrik

--- linux-2.4.21-pre2.old/drivers/video/riva/fbdev.c	2002-08-03 02:39:45.000000000 +0200
+++ linux-2.4.21-pre2.new/drivers/video/riva/fbdev.c	2003-01-19 13:21:46.000000000 +0100
@@ -920,6 +920,15 @@
 	newmode.ext.width = width;
 	newmode.ext.height = height;
 
+	if(video_mode->sync & FB_SYNC_HOR_HIGH_ACT)
+		newmode.misc_output &= ~0x40;
+	else
+		newmode.misc_output |= 0x40;
+	if(video_mode->sync & FB_SYNC_VERT_HIGH_ACT)
+		newmode.misc_output &= ~0x80;
+	else
+		newmode.misc_output |= 0x80;
+	
 	rinfo->riva.CalcStateExt(&rinfo->riva, &newmode.ext, bpp, width,
 				  hDisplaySize, hDisplay, hStart, hEnd,
 				  hTotal, height, vDisplay, vStart, vEnd,



-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-01-24 19:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-19 12:55 [PATCH] rivafb sync polarity problem? Fredrik Noring
2003-01-19 16:25 ` Antonino Daplas
2003-01-19 16:55   ` Fredrik Noring
2003-01-19 16:49 ` Antonino Daplas
2003-01-19 17:38   ` Fredrik Noring
2003-01-24 19:39 ` James Simmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).