From ccc068842d5faa33b78b305671e540c9303d3132 Mon Sep 17 00:00:00 2001 From: Connor Behan Date: Tue, 30 Jun 2015 22:56:15 -0400 Subject: [PATCH] Debug try 1 --- src/r128.h | 2 +- src/r128_output.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/r128.h b/src/r128.h index e3253a5..37902d3 100644 --- a/src/r128.h +++ b/src/r128.h @@ -111,7 +111,7 @@ #define cpu_to_le16(x) (x) #endif -#define R128_DEBUG 0 /* Turn off debugging output */ +#define R128_DEBUG 1 /* Turn off debugging output */ #define R128_IDLE_RETRY 32 /* Fall out of idle loops after this count */ #define R128_TIMEOUT 2000000 /* Fall out of wait loops after this count */ #define R128_MMIOSIZE 0x4000 diff --git a/src/r128_output.c b/src/r128_output.c index 35aab72..cfa184a 100644 --- a/src/r128_output.c +++ b/src/r128_output.c @@ -237,6 +237,8 @@ static R128MonitorType R128DisplayDDCConnected(xf86OutputPtr output) xf86MonPtr *MonInfo = &output->MonInfo; uint32_t mask1, mask2; + R128TRACE(("Trying DDC\n")); + if (r128_output->type == OUTPUT_LVDS) { return MT_LCD; } else if (r128_output->type == OUTPUT_VGA) { @@ -249,6 +251,7 @@ static R128MonitorType R128DisplayDDCConnected(xf86OutputPtr output) if (r128_output->pI2CBus) { R128I2CBusPtr pR128I2CBus = &(r128_output->ddc_i2c); + R128TRACE(("Trying I2C\n")); /* XXX: Radeon does something here to appease old monitors. */ OUTREG(pR128I2CBus->ddc_reg, INREG(pR128I2CBus->ddc_reg) | mask1); @@ -260,6 +263,7 @@ static R128MonitorType R128DisplayDDCConnected(xf86OutputPtr output) } if (*MonInfo) { + R128TRACE(("Got moninfo\n")); if (r128_output->type == OUTPUT_VGA) { MonType = MT_CRT; } else { @@ -269,10 +273,12 @@ static R128MonitorType R128DisplayDDCConnected(xf86OutputPtr output) MonType = MT_CRT; } } else if (xf86I2CProbeAddress(r128_output->pI2CBus, 0x0060)) { + R128TRAC(("Got it the other way\n")); /* Just in case. */ MonType = MT_CRT; } + R128TRACE(("Monitor detection done\n")); return MonType; } -- 2.4.5