[Haiku-commits] r30938 - in haiku/trunk: headers/private/graphics/nvidia src/add-ons/accelerants/nvidia/engine

rudolfc at mail.berlios.de rudolfc at mail.berlios.de
Mon Jun 1 22:06:23 CEST 2009


Author: rudolfc
Date: 2009-06-01 22:06:21 +0200 (Mon, 01 Jun 2009)
New Revision: 30938
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=30938&view=rev

Modified:
   haiku/trunk/headers/private/graphics/nvidia/nv_macros.h
   haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_i2c.c
Log:
added enabling I2C buses for NV40 arch cards. hopefully this makes the buses work on GF6100 (noted in bug #2780) and maybe others. added a few registerdefines (wip).

Modified: haiku/trunk/headers/private/graphics/nvidia/nv_macros.h
===================================================================
--- haiku/trunk/headers/private/graphics/nvidia/nv_macros.h	2009-06-01 11:12:12 UTC (rev 30937)
+++ haiku/trunk/headers/private/graphics/nvidia/nv_macros.h	2009-06-01 20:06:21 UTC (rev 30938)
@@ -759,6 +759,9 @@
 #define NVCRTCX_WR_I2CBUS_0	0x3f
 #define NVCRTCX_EXTRA		0x41
 #define NVCRTCX_OWNER		0x44
+#define NVCRTCX_I2C_LOCK	0x49
+#define NVCRTCX_RD_I2CBUS_2	0x50
+#define NVCRTCX_WR_I2CBUS_2	0x51
 #define NVCRTCX_FP_HTIMING	0x53
 #define NVCRTCX_FP_VTIMING	0x54
 #define NVCRTCX_0x59		0x59

Modified: haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_i2c.c
===================================================================
--- haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_i2c.c	2009-06-01 11:12:12 UTC (rev 30937)
+++ haiku/trunk/src/add-ons/accelerants/nvidia/engine/nv_i2c.c	2009-06-01 20:06:21 UTC (rev 30938)
@@ -2,7 +2,7 @@
  * i2c interface.
  * Bus should be run at max. 100kHz: see original Philips I2C specification
  *	
- * Rudolf Cornelissen 12/2002-5/2009
+ * Rudolf Cornelissen 12/2002-6/2009
  */
 
 #define MODULE_BIT 0x00004000
@@ -296,6 +296,10 @@
 	/* enable access to primary head */
 	set_crtc_owner(0);
 
+	/* on some NV40 architecture cards the i2c busses can be disabled: enable them */
+	if (si->ps.card_arch == NV40A)
+		CRTCW(I2C_LOCK ,(CRTCR(I2C_LOCK) | 0x04));
+
 	/* preset no board wired buses */
 	si->ps.i2c_bus0 = false;
 	si->ps.i2c_bus1 = false;




More information about the Haiku-commits mailing list