xf86-video-intel: src/i810_reg.h src/i830_i2c.c
Eric Anholt
anholt at kemper.freedesktop.org
Tue Feb 26 13:25:34 PST 2008
src/i810_reg.h | 8 ++++++++
src/i830_i2c.c | 7 +++++++
2 files changed, 15 insertions(+)
New commits:
commit e55d86f654aa9dd4951b441636c8ca4b37786daf
Author: Eric Anholt <eric at anholt.net>
Date: Tue Feb 26 12:26:23 2008 -0800
Fix SDVO I2C access on Mac Mini in EFI mode.
The GMBUS was being left in SDVO pin access mode, which blocked our bit-banging
access to those pins. Thanks to Peter Jones for quick debugging turnaround
in getting this fixed.
diff --git a/src/i810_reg.h b/src/i810_reg.h
index 9eeddc9..d5b6805 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -290,6 +290,14 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# define GPIO_DATA_VAL_IN (1 << 12)
# define GPIO_DATA_PULLUP_DISABLE (1 << 13)
+/* GMBus registers for hardware-assisted (non-bitbanging) I2C access */
+#define GMBUS0 0x5100
+#define GMBUS1 0x5104
+#define GMBUS2 0x5108
+#define GMBUS3 0x510c
+#define GMBUS4 0x5110
+#define GMBUS5 0x5120
+
/* p317, 319
*/
#define VCLK2_VCO_M 0x6008 /* treat as 16 bit? (includes msbs) */
diff --git a/src/i830_i2c.c b/src/i830_i2c.c
index d80229d..33a75a8 100644
--- a/src/i830_i2c.c
+++ b/src/i830_i2c.c
@@ -346,6 +346,7 @@ Bool
I830I2CInit(ScrnInfoPtr pScrn, I2CBusPtr *bus_ptr, int i2c_reg, char *name)
{
I2CBusPtr pI2CBus;
+ I830Ptr pI830 = I830PTR(pScrn);
pI2CBus = xf86CreateI2CBusRec();
@@ -379,6 +380,12 @@ I830I2CInit(ScrnInfoPtr pScrn, I2CBusPtr *bus_ptr, int i2c_reg, char *name)
pI2CBus->AcknTimeout = 40;
pI2CBus->RiseFallTime = 20;
+ /* Disable the GMBUS, which we won't use. If it is left enabled (for
+ * example, by Mac Mini EFI initialization), GPIO access to the pins it
+ * uses gets disabled.
+ */
+ OUTREG(GMBUS0, 0);
+
if (!xf86I2CBusInit(pI2CBus))
return FALSE;
More information about the xorg-commit
mailing list