[Haiku-commits] r31277 - haiku/trunk/src/add-ons/accelerants/intel_extreme

axeld at BerliOS axeld at mail.berlios.de
Sat Jun 27 20:07:38 CEST 2009


Author: axeld
Date: 2009-06-27 20:07:37 +0200 (Sat, 27 Jun 2009)
New Revision: 31277
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31277&view=rev

Modified:
   haiku/trunk/src/add-ons/accelerants/intel_extreme/mode.cpp
Log:
* Make sure that the bytes per scanline is always a multiple of 64. This fixes
  1680x1050 with 16 bit on i865+ (still need to check the restrictions of
  older chips).


Modified: haiku/trunk/src/add-ons/accelerants/intel_extreme/mode.cpp
===================================================================
--- haiku/trunk/src/add-ons/accelerants/intel_extreme/mode.cpp	2009-06-27 18:03:33 UTC (rev 31276)
+++ haiku/trunk/src/add-ons/accelerants/intel_extreme/mode.cpp	2009-06-27 18:07:37 UTC (rev 31277)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006-2008, Haiku, Inc. All Rights Reserved.
+ * Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
  * Distributed under the terms of the MIT License.
  *
  * Support for i915 chipset and up based on the X driver,
@@ -281,7 +281,7 @@
 				== LVDS_CLKB_POWER_UP)
 			divisors.post2 = LVDS_POST2_RATE_FAST;
 		else
-			divisors.post2 = LVDS_POST2_RATE_SLOW;	
+			divisors.post2 = LVDS_POST2_RATE_SLOW;
 	} else {
 		if (current.timing.pixel_clock < limits.min_post2_frequency) {
 			// slow DAC timing
@@ -341,7 +341,7 @@
 {
 	// dump currently programmed mode.
 	display_mode biosMode;
-	
+
 	uint32 pll = read32(INTEL_DISPLAY_B_PLL);
 	uint32 pllDivisor = read32(INTEL_DISPLAY_B_PLL_DIVISOR_0);
 
@@ -475,6 +475,11 @@
 	}
 
 	bytesPerRow = mode.virtual_width * bytesPerPixel;
+
+	// Make sure bytesPerRow is a multiple of 64
+	// TODO: check if the older chips have the same restriction!
+	if ((bytesPerRow & 63) != 0)
+		bytesPerRow = (bytesPerRow + 63) & ~63;
 }
 
 
@@ -702,7 +707,7 @@
 			read32(INTEL_DISPLAY_B_PIPE_CONTROL) | DISPLAY_PIPE_ENABLED);
 		read32(INTEL_DISPLAY_B_PIPE_CONTROL);
 	}
-	
+
 	if (gInfo->head_mode & HEAD_MODE_A_ANALOG) {
 		pll_divisors divisors;
 		compute_pll_divisors(target, divisors,false);




More information about the Haiku-commits mailing list