[Haiku-commits] r31341 - haiku/trunk/src/add-ons/accelerants/nvidia/engine

rudolfc at mail.berlios.de rudolfc at mail.berlios.de
Tue Jun 30 20:35:34 CEST 2009


Author: rudolfc
Date: 2009-06-30 20:35:32 +0200 (Tue, 30 Jun 2009)
New Revision: 31341
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31341&view=rev

Modified:
   haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c
Log:
fixed panel detection for NV11, I accidentally broke that with a recent commit.

Modified: haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c
===================================================================
--- haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c	2009-06-30 18:12:23 UTC (rev 31340)
+++ haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_info.c	2009-06-30 18:35:32 UTC (rev 31341)
@@ -2618,6 +2618,27 @@
 	/* setup output devices and heads */
 	if (si->ps.secondary_head)
 	{
+		/* fill-out crtc2_screen from panel info gathered from BIOS programming since
+		 * we don't know which connector connects to crtc2 (so EDID use not possible).
+		 * Also the BIOS might have programmed for a lower mode than EDID reports:
+		 * which limits our use of the panel (LVDS link setup too slow). */
+		if(si->ps.monitors & CRTC2_TMDS) {
+			si->ps.crtc2_screen.timing.pixel_clock = si->ps.p1_timing.pixel_clock;
+			si->ps.crtc2_screen.timing.h_display = si->ps.p1_timing.h_display;
+			si->ps.crtc2_screen.timing.h_sync_start = si->ps.p1_timing.h_sync_start;
+			si->ps.crtc2_screen.timing.h_sync_end = si->ps.p1_timing.h_sync_end;
+			si->ps.crtc2_screen.timing.h_total = si->ps.p1_timing.h_total;
+			si->ps.crtc2_screen.timing.v_display = si->ps.p1_timing.h_display;
+			si->ps.crtc2_screen.timing.v_sync_start = si->ps.p1_timing.v_sync_start;
+			si->ps.crtc2_screen.timing.v_sync_end = si->ps.p1_timing.v_sync_end;
+			si->ps.crtc2_screen.timing.v_total = si->ps.p1_timing.v_total;
+			si->ps.crtc2_screen.timing.flags = si->ps.p1_timing.flags;
+			si->ps.crtc2_screen.have_edid = true;
+			si->ps.crtc2_screen.aspect =
+				(si->ps.p2_timing.h_display / ((float)si->ps.p2_timing.v_display));
+			si->ps.crtc2_screen.digital = true;
+		}
+
 		if (si->ps.card_type != NV11)
 		{
 			/* panels are pre-connected to a CRTC (1 or 2) by the card's BIOS,
@@ -2638,27 +2659,8 @@
 			}
 
 			/* Note: digitally connected panels take precedence over analog connected screens. */
-
-			/* fill-out crtc2_screen from panel info gathered from BIOS programming since
-			 * we don't know which connector connects to crtc2 (so EDID use not possible).
-			 * Also the BIOS might have programmed for a lower mode than EDID reports:
-			 * which limits our use of the panel (LVDS link setup too slow). */
-			if(si->ps.monitors & CRTC2_TMDS) {
-				si->ps.crtc2_screen.timing.pixel_clock = si->ps.p1_timing.pixel_clock;
-				si->ps.crtc2_screen.timing.h_display = si->ps.p1_timing.h_display;
-				si->ps.crtc2_screen.timing.h_sync_start = si->ps.p1_timing.h_sync_start;
-				si->ps.crtc2_screen.timing.h_sync_end = si->ps.p1_timing.h_sync_end;
-				si->ps.crtc2_screen.timing.h_total = si->ps.p1_timing.h_total;
-				si->ps.crtc2_screen.timing.v_display = si->ps.p1_timing.h_display;
-				si->ps.crtc2_screen.timing.v_sync_start = si->ps.p1_timing.v_sync_start;
-				si->ps.crtc2_screen.timing.v_sync_end = si->ps.p1_timing.v_sync_end;
-				si->ps.crtc2_screen.timing.v_total = si->ps.p1_timing.v_total;
-				si->ps.crtc2_screen.timing.flags = si->ps.p1_timing.flags;
-				si->ps.crtc2_screen.have_edid = true;
-				si->ps.crtc2_screen.aspect =
-					(si->ps.p2_timing.h_display / ((float)si->ps.p2_timing.v_display));
-				si->ps.crtc2_screen.digital = true;
-			} else if(si->ps.monitors & CRTC2_VGA) {
+			/* fill-out crtc2_screen if not already filled in by TMDS */
+			if ((si->ps.monitors & (CRTC2_TMDS | CRTC2_VGA)) == CRTC2_VGA) {
 				/* fill-out crtc2_screen from EDID info, or faked info if EDID failed. */
 				memcpy(&(si->ps.crtc2_screen), &(si->ps.con2_screen), sizeof(si->ps.crtc2_screen));
 			}
@@ -2775,6 +2777,9 @@
 
 			/* (DDC or load sense analog monitor on secondary connector is impossible on NV11) */
 
+			/* force widescreen types if requested */
+			if (si->settings.force_ws) si->ps.crtc2_screen.aspect = 1.60;
+
 			/* setup correct output and head use */
 			//fixme? add TVout (only, so no CRT(s) connected) support...
 			switch (si->ps.monitors)




More information about the Haiku-commits mailing list