xf86-video-intel: Branch 'modesetting' - 2 commits - src/ch7xxx/ch7xxx.c src/ch7xxx/ch7xxx_reg.h src/i830_lvds.c src/i830_xf86Crtc.h
Dave Airlie
airlied at kemper.freedesktop.org
Tue Jan 23 07:11:15 EET 2007
src/ch7xxx/ch7xxx.c | 8 +++++++-
src/ch7xxx/ch7xxx_reg.h | 4 +++-
src/i830_lvds.c | 4 ++++
src/i830_xf86Crtc.h | 3 ++-
4 files changed, 16 insertions(+), 3 deletions(-)
New commits:
diff-tree effe579e691b044e3ce59b41b5c0eaaac4368dda (from c68dae2705d6e5b05dba7d40b6da112b98b926b4)
Author: Dave Airlie <airlied at linux.ie>
Date: Sun Jan 21 20:23:13 2007 +1100
ch7xxx: fix output detection as per datasheet, have no DVI to test this.
diff --git a/src/ch7xxx/ch7xxx.c b/src/ch7xxx/ch7xxx.c
index 5bfb7c5..9e2a005 100644
--- a/src/ch7xxx/ch7xxx.c
+++ b/src/ch7xxx/ch7xxx.c
@@ -182,7 +182,13 @@ out:
static xf86OutputStatus
ch7xxx_detect(I2CDevPtr d)
{
- return XF86OutputStatusUnknown;
+ struct ch7xxx_priv *dev_priv = d->DriverPrivate.ptr;
+ CARD8 cdet;
+ ch7xxx_read(dev_priv, CH7xxx_CONNECTION_DETECT, &cdet);
+
+ if (cdet & CH7xxx_CDET_DVI)
+ return XF86OutputStatusConnected;
+ return XF86OutputStatusDisconnected;
}
static ModeStatus
diff --git a/src/ch7xxx/ch7xxx_reg.h b/src/ch7xxx/ch7xxx_reg.h
index c626e1f..0ec84ea 100644
--- a/src/ch7xxx/ch7xxx_reg.h
+++ b/src/ch7xxx/ch7xxx_reg.h
@@ -49,7 +49,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define CH7xxx_IDF_HSP (1<<3)
#define CH7xxx_IDF_VSP (1<<4)
-#define CH7301_CONNECTION_DETECT 0x20
+#define CH7xxx_CONNECTION_DETECT 0x20
+#define CH7xxx_CDET_DVI (1<<5)
+
#define CH7301_DAC_CNTL 0x21
#define CH7301_HOTPLUG 0x23
#define CH7xxx_TCTL 0x31
diff-tree c68dae2705d6e5b05dba7d40b6da112b98b926b4 (from 8eb861fb61fda78e6c142ffa66c586357aaa2e44)
Author: Dave Airlie <airlied at linux.ie>
Date: Sun Jan 21 20:22:39 2007 +1100
fix building with 7.1 server by hiding stuff inside RANDR_12_INTERFACE
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 223c6ab..0092ded 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -354,6 +354,7 @@ i830_lvds_create_resources(xf86OutputPtr
#endif /* RANDR_12_INTERFACE */
}
+#ifdef RANDR_12_INTERFACE
static Bool
i830_lvds_set_property(xf86OutputPtr output, Atom property,
RRPropertyValuePtr value)
@@ -381,6 +382,7 @@ i830_lvds_set_property(xf86OutputPtr out
return TRUE;
}
+#endif /* RANDR_12_INTERFACE */
static const xf86OutputFuncsRec i830_lvds_output_funcs = {
.create_resources = i830_lvds_create_resources,
@@ -392,7 +394,9 @@ static const xf86OutputFuncsRec i830_lvd
.mode_set = i830_lvds_mode_set,
.detect = i830_lvds_detect,
.get_modes = i830_lvds_get_modes,
+#ifdef RANDR_12_INTERFACE
.set_property = i830_lvds_set_property,
+#endif
.destroy = i830_lvds_destroy
};
diff --git a/src/i830_xf86Crtc.h b/src/i830_xf86Crtc.h
index 04374b7..f8b561a 100644
--- a/src/i830_xf86Crtc.h
+++ b/src/i830_xf86Crtc.h
@@ -252,6 +252,7 @@ typedef struct _xf86OutputFuncs {
DisplayModePtr
(*get_modes)(xf86OutputPtr output);
+#ifdef RANDR_12_INTERFACE
/**
* Callback when an output's property has changed.
*/
@@ -259,7 +260,7 @@ typedef struct _xf86OutputFuncs {
(*set_property)(xf86OutputPtr output,
Atom property,
RRPropertyValuePtr value);
-
+#endif
/**
* Clean up driver-specific bits of the output
*/
More information about the xorg-commit
mailing list