[PATCH] Fix get_std_timing

STALE8413d

2 messages, 2 authors, 2003-09-29 · open the first message on its own page

[PATCH] Fix get_std_timing

From: Kronos <hidden>
Date: 2003-09-29 19:34:08

Hi James,
it seems  that you  lost the  following patch. It  fixes get_std_timing.
Current code doesn't search the  VESA modedb. Instead it exits after the
first  iteration  with  mode calculated  by  calc_mode_timings. Bug  was
spotted by Antonino Daplas. Please apply:

===== 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 it using GTF */
+	calc_mode_timings(xres, yres, refresh, mode);
+	
 	return 1;
 }
 
Luca
-- 
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
Windows /win'dohz/ n. : thirty-two  bit extension and graphical shell to
a sixteen  bit patch to an  eight bit operating system  originally coded
for a  four bit microprocessor  which was  written by a  two-bit company
that can't stand a bit of competition.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

Re: [PATCH] Fix get_std_timing

From: James Simmons <hidden>
Date: 2003-09-29 22:09:37

Applied.


On Sat, 27 Sep 2003, Kronos wrote:
quoted hunk
Hi James,
it seems  that you  lost the  following patch. It  fixes get_std_timing.
Current code doesn't search the  VESA modedb. Instead it exits after the
first  iteration  with  mode calculated  by  calc_mode_timings. Bug  was
spotted by Antonino Daplas. Please apply:

===== 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 it using GTF */
+	calc_mode_timings(xres, yres, refresh, mode);
+	
 	return 1;
 }
 
Luca


-------------------------------------------------------
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