Thread (45 messages) 45 messages, 5 authors, 2003-09-15

Re: Re: New radeonfb, mostly untested

From: Kronos <hidden>
Date: 2003-09-15 16:02:12

Il Mon, Sep 15, 2003 at 08:56:07AM +0800, Tony ha scritto: 
The bug may actually be in the following code:

static int get_std_timing(unsigned char *block, struct fb_videomode
*mode)
{
[cut] 
 	for (i = 0; i < VESA_MODEDB_SIZE; i++) {
		if (vesa_modes[i].xres == xres &&
		    vesa_modes[i].yres == yres &&
 		    vesa_modes[i].refresh == refresh) {
 			*mode = vesa_modes[i];
			break;
 		} else {
			calc_mode_timings(xres, yres, refresh, mode);
			break;
 		}
 	}
	return 1;
}
Ah, good catch. I  really missed that. This would explain  why XFree and
radeonfb use different modelines.

James, can you apply this patch:

===== drivers/video/fbmon.c 1.9 vs edited =====
--- 1.9/drivers/video/fbmon.c	Wed Jun  4 07:55:19 2003
+++ edited/drivers/video/fbmon.c	Mon Sep 15 17:59:28 2003
@@ -566,17 +566,19 @@
 	}
 	refresh = (block[1] & 0x3f) + 60;
 
+	/* First find standard mode from the table of VESA modes */
 	for (i = 0; i < VESA_MODEDB_SIZE; i++) {
 		if (vesa_modes[i].xres == xres && 
 		    vesa_modes[i].yres == yres &&
 		    vesa_modes[i].refresh == refresh) {
 			*mode = vesa_modes[i];
-			break;
-		} else {
-			calc_mode_timings(xres, yres, refresh, mode);
-			break;
+			return 1;
 		}
 	}
+
+	/* If mode is not found in table, calculate using GTF */
+	calc_mode_timings(xres, yres, refresh, mode);
+	
 	return 1;
 }

Luca
-- 
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
Il dottore mi ha detto di smettere di fare cene intime per quattro.
A meno che non ci siamo altre tre persone.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help