xserver: Branch 'server-1.3-branch' - 3 commits
Keith Packard
keithp at kemper.freedesktop.org
Mon Mar 5 05:21:07 EET 2007
hw/xfree86/modes/xf86Crtc.c | 19 +++++++++++----
hw/xfree86/modes/xf86Crtc.h | 44 +++++++++++++++++++++++++++++++++++++
hw/xfree86/os-support/xf86_OSlib.h | 2 -
3 files changed, 59 insertions(+), 6 deletions(-)
New commits:
diff-tree e707604ab3fd45c1f9d07b666181fc181e68a827 (from 6b63fb399a904c3953b7b347483980a9768c7878)
Author: Alan Coopersmith <alan.coopersmith at sun.com>
Date: Tue Feb 27 09:55:48 2007 -0800
Sun bug 6529003: Xorg should not be including <sys/immu.h> on Solaris
<sys/immu.h> was removed from the latest Solaris Nevada build, but it's
been useless to Xorg for a long time (it only declared a couple of kernel
variables)
<http://bugs.opensolaris.org/view_bug.do?bug_id=6529003>
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index e048547..934c52a 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -130,8 +130,8 @@ typedef signed long xf86ssize_t;
# include <errno.h>
# if defined(_NEED_SYSI86)
-# include <sys/immu.h>
# if !(defined (sun) && defined (SVR4))
+# include <sys/immu.h>
# include <sys/region.h>
# endif
# include <sys/proc.h>
diff-tree 6b63fb399a904c3953b7b347483980a9768c7878 (from 90f5e77eab88522d64c6e20cd77a7a680eab3b1b)
Author: Dave Airlie <airlied at linux.ie>
Date: Mon Mar 5 13:46:41 2007 +1100
add a standard connector type and name for us as an output property
(cherry picked from commit 8ba5e8d82014b774a52f3e050ddbbb8bde4e0933)
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 8b13e2b..2ffa956 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1738,3 +1738,12 @@ xf86OutputGetEDID (xf86OutputPtr output,
return xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus);
}
+
+static char *_xf86ConnectorNames[] = { "None", "VGA", "DVI-I", "DVI-D",
+ "DVI-A", "Composite", "S-Video",
+ "Component", "LFP", "Proprietary" };
+char *
+xf86ConnectorGetName(xf86ConnectorType connector)
+{
+ return _xf86ConnectorNames[connector];
+}
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index c8aafc1..537df3a 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -41,6 +41,20 @@
typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr;
typedef struct _xf86Output xf86OutputRec, *xf86OutputPtr;
+/* define a standard for connector types */
+typedef enum _xf86ConnectorType {
+ XF86ConnectorNone,
+ XF86ConnectorVGA,
+ XF86ConnectorDVI_I,
+ XF86ConnectorDVI_D,
+ XF86ConnectorDVI_A,
+ XF86ConnectorComposite,
+ XF86ConnectorSvideo,
+ XF86ConnectorComponent,
+ XF86ConnectorLFP,
+ XF86ConnectorProprietary,
+} xf86ConnectorType;
+
typedef enum _xf86OutputStatus {
XF86OutputStatusConnected,
XF86OutputStatusDisconnected,
@@ -618,4 +632,10 @@ xf86DiDGAReInit (ScreenPtr pScreen);
void
xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen);
+/*
+ * Get a standard string name for a connector type
+ */
+char *
+xf86ConnectorGetName(xf86ConnectorType connector);
+
#endif /* _XF86CRTC_H_ */
diff-tree 90f5e77eab88522d64c6e20cd77a7a680eab3b1b (from e6af7569f201842b4754aec6e72b30dc2daefdfb)
Author: Dave Airlie <airlied at linux.ie>
Date: Mon Feb 26 09:40:00 2007 +1100
modes: add commit/prepare hooks
(cherry picked from commit 2e31872e05c2408d53ba0182bcddc5dabb3615fe)
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index c53d2a8..8b13e2b 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -282,7 +282,7 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, Displ
goto done;
}
- /* Disable the outputs and CRTCs before setting the mode. */
+ /* Prepare the outputs and CRTCs before setting the mode. */
for (i = 0; i < xf86_config->num_output; i++) {
xf86OutputPtr output = xf86_config->output[i];
@@ -290,10 +290,10 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, Displ
continue;
/* Disable the output as the first thing we do. */
- output->funcs->dpms(output, DPMSModeOff);
+ output->funcs->prepare(output);
}
- crtc->funcs->dpms(crtc, DPMSModeOff);
+ crtc->funcs->prepare(crtc);
/* Set up the DPLL and any output state that needs to adjust or depend
* on the DPLL.
@@ -307,12 +307,12 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, Displ
}
/* Now, enable the clocks, plane, pipe, and outputs that we set up. */
- crtc->funcs->dpms(crtc, DPMSModeOn);
+ crtc->funcs->commit(crtc);
for (i = 0; i < xf86_config->num_output; i++)
{
xf86OutputPtr output = xf86_config->output[i];
if (output->crtc == crtc)
- output->funcs->dpms(output, DPMSModeOn);
+ output->funcs->commit(output);
}
/* XXX free adjustedmode */
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index b04f7f3..c8aafc1 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -97,6 +97,12 @@ typedef struct _xf86CrtcFuncs {
DisplayModePtr adjusted_mode);
/**
+ * Prepare CRTC for an upcoming mode set.
+ */
+ void
+ (*prepare)(xf86CrtcPtr crtc);
+
+ /**
* Callback for setting up a video mode after fixups have been made.
*/
void
@@ -105,6 +111,12 @@ typedef struct _xf86CrtcFuncs {
DisplayModePtr adjusted_mode,
int x, int y);
+ /**
+ * Commit mode changes to a CRTC
+ */
+ void
+ (*commit)(xf86CrtcPtr crtc);
+
/* Set the color ramps for the CRTC to the given values. */
void
(*gamma_set)(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
@@ -264,6 +276,18 @@ typedef struct _xf86OutputFuncs {
DisplayModePtr adjusted_mode);
/**
+ * Callback for preparing mode changes on an output
+ */
+ void
+ (*prepare)(xf86OutputPtr output);
+
+ /**
+ * Callback for committing mode changes on an output
+ */
+ void
+ (*commit)(xf86OutputPtr output);
+
+ /**
* Callback for setting up a video mode after fixups have been made.
*
* This is only called while the output is disabled. The dpms callback
More information about the xorg-commit
mailing list