xf86-video-intel: Branch 'modesetting' - 2 commits - src/i830_crt.c src/i830_dvo.c src/i830_lvds.c src/i830_randr.c src/i830_sdvo.c src/i830_tv.c src/i830_xf86Crtc.c src/i830_xf86Crtc.h src/i830_xf86Modes.c src/i830_xf86Modes.h
Keith Packard
keithp at kemper.freedesktop.org
Sun Dec 31 07:58:49 EET 2006
src/i830_crt.c | 2 ++
src/i830_dvo.c | 2 ++
src/i830_lvds.c | 2 ++
src/i830_randr.c | 2 +-
src/i830_sdvo.c | 2 ++
src/i830_tv.c | 2 ++
src/i830_xf86Crtc.c | 26 +++++++++++++++++++-------
src/i830_xf86Crtc.h | 16 ++++++++++++++++
src/i830_xf86Modes.c | 9 ++++++++-
src/i830_xf86Modes.h | 2 +-
10 files changed, 55 insertions(+), 10 deletions(-)
New commits:
diff-tree c70e7bc701cba3092acfdd66ed4d63487ac8ff9f (from parents)
Merge: 8b6c456e16c81f719bb68178e3e4d26f4108a9c2 4ed79a2ba6250354ffc24fa1f7a21ca914ad157e
Author: Keith Packard <keithp at neko.keithp.com>
Date: Sat Dec 30 21:58:36 2006 -0800
Merge branch 'modesetting-origin' into modesetting
diff-tree 8b6c456e16c81f719bb68178e3e4d26f4108a9c2 (from b8692e646227e56c9ae4f72b9aaa75457b4c0f5f)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Sat Dec 30 21:57:42 2006 -0800
Detect in ProbeModes. Let get_modes set edid. Prune interlace/dblscan.
Move output connection status detection from RandR code up to ProbeModes so
it is done before mode sets are built. Otherwise, the mode building code
will elide all modes the first time through as it ignores outputs that are
disconnected.
Most get_modes functions fetch EDID data; make sure that any
EDID changes are used in the ProbeModes filtering of default modes.
Otherwise, stale EDID data will be used.
Allow outputs to advertise support for interlaced and double scan modes;
prune such modes from the default mode list when outputs do not support them.
diff --git a/src/i830_crt.c b/src/i830_crt.c
index 85c25de..4e9e370 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -365,6 +365,8 @@ i830_crt_init(ScrnInfoPtr pScrn)
i830_output->type = I830_OUTPUT_ANALOG;
output->driver_private = i830_output;
+ output->interlaceAllowed = FALSE;
+ output->doubleScanAllowed = FALSE;
/* Set up the DDC bus. */
I830I2CInit(pScrn, &i830_output->pDDCBus, GPIOA, "CRTDDC_A");
diff --git a/src/i830_dvo.c b/src/i830_dvo.c
index d101054..37caf00 100644
--- a/src/i830_dvo.c
+++ b/src/i830_dvo.c
@@ -257,6 +257,8 @@ i830_dvo_init(ScrnInfoPtr pScrn)
intel_output->type = I830_OUTPUT_DVO;
output->driver_private = intel_output;
output->subpixel_order = SubPixelHorizontalRGB;
+ output->interlaceAllowed = FALSE;
+ output->doubleScanAllowed = FALSE;
/* Set up the DDC bus */
ret = I830I2CInit(pScrn, &intel_output->pDDCBus, GPIOD, "DVODDC_D");
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index fe96413..18ac76b 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -361,6 +361,8 @@ i830_lvds_init(ScrnInfoPtr pScrn)
intel_output->type = I830_OUTPUT_LVDS;
output->driver_private = intel_output;
output->subpixel_order = SubPixelHorizontalRGB;
+ output->interlaceAllowed = FALSE;
+ output->doubleScanAllowed = FALSE;
/* Set up the LVDS DDC channel. Most panels won't support it, but it can
* be useful if available.
diff --git a/src/i830_randr.c b/src/i830_randr.c
index 3d6febc..64d7d1f 100644
--- a/src/i830_randr.c
+++ b/src/i830_randr.c
@@ -740,7 +740,7 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen)
output->mm_height);
xf86RROutputSetModes (output->randr_output, output->probed_modes);
- switch (output->status = (*output->funcs->detect)(output)) {
+ switch (output->status) {
case XF86OutputStatusConnected:
RROutputSetConnection (output->randr_output, RR_Connected);
break;
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index cb68802..b5116be 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1091,6 +1091,8 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int ou
return;
}
output->driver_private = intel_output;
+ output->interlaceAllowed = FALSE;
+ output->doubleScanAllowed = FALSE;
dev_priv = (struct i830_sdvo_priv *) (intel_output + 1);
intel_output->type = I830_OUTPUT_SDVO;
diff --git a/src/i830_tv.c b/src/i830_tv.c
index 6231891..f17a353 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1035,4 +1035,6 @@ i830_tv_init(ScrnInfoPtr pScrn)
dev_priv->type = TV_TYPE_UNKNOWN;
output->driver_private = intel_output;
+ output->interlaceAllowed = FALSE;
+ output->doubleScanAllowed = FALSE;
}
diff --git a/src/i830_xf86Crtc.c b/src/i830_xf86Crtc.c
index f2d6026..6e9e52a 100644
--- a/src/i830_xf86Crtc.c
+++ b/src/i830_xf86Crtc.c
@@ -542,19 +542,27 @@ xf86ProbeOutputModes (ScrnInfoPtr pScrn)
{
xf86OutputPtr output = config->output[o];
DisplayModePtr mode;
- DisplayModePtr config_modes, output_modes, default_modes;
- XF86ConfMonitorPtr conf_monitor = output->conf_monitor;
- xf86MonPtr edid_monitor = output->MonInfo;
+ DisplayModePtr config_modes = NULL, output_modes, default_modes;
+ XF86ConfMonitorPtr conf_monitor;
+ xf86MonPtr edid_monitor;
MonRec mon_rec;
enum { sync_config, sync_edid, sync_default } sync_source = sync_default;
while (output->probed_modes != NULL)
xf86DeleteMode(&output->probed_modes, output->probed_modes);
+ /*
+ * Check connection status
+ */
+ output->status = (*output->funcs->detect)(output);
+
if (output->status == XF86OutputStatusDisconnected)
continue;
memset (&mon_rec, '\0', sizeof (mon_rec));
+
+ conf_monitor = output->conf_monitor;
+
if (conf_monitor)
{
int i;
@@ -573,7 +581,13 @@ xf86ProbeOutputModes (ScrnInfoPtr pScrn)
mon_rec.nVrefresh++;
sync_source = sync_config;
}
+ config_modes = i830xf86GetMonitorModes (pScrn, conf_monitor);
}
+
+ output_modes = (*output->funcs->get_modes) (output);
+
+ edid_monitor = output->MonInfo;
+
if (edid_monitor)
{
int i;
@@ -621,10 +635,8 @@ xf86ProbeOutputModes (ScrnInfoPtr pScrn)
mon_rec.vrefresh[0].hi = 62.0;
mon_rec.nVrefresh = 1;
}
-
- config_modes = i830xf86GetMonitorModes (pScrn, conf_monitor);
- output_modes = (*output->funcs->get_modes) (output);
- default_modes = i830xf86GetDefaultModes ();
+ default_modes = i830xf86GetDefaultModes (output->interlaceAllowed,
+ output->doubleScanAllowed);
if (sync_source == sync_config)
{
diff --git a/src/i830_xf86Crtc.h b/src/i830_xf86Crtc.h
index 168d89d..3e70563 100644
--- a/src/i830_xf86Crtc.h
+++ b/src/i830_xf86Crtc.h
@@ -261,6 +261,17 @@ struct _xf86Output {
* Possible outputs to share the same CRTC as a mask of output indices
*/
CARD32 possible_clones;
+
+ /**
+ * Whether this output can support interlaced modes
+ */
+ Bool interlaceAllowed;
+
+ /**
+ * Whether this output can support double scan modes
+ */
+ Bool doubleScanAllowed;
+
/**
* List of available modes on this output.
*
@@ -270,6 +281,11 @@ struct _xf86Output {
DisplayModePtr probed_modes;
/**
+ * Desired initial position
+ */
+ int initial_x, initial_y;
+
+ /**
* Current connection status
*
* This indicates whether a monitor is known to be connected
diff --git a/src/i830_xf86Modes.c b/src/i830_xf86Modes.c
index 3a272cb..482a332 100644
--- a/src/i830_xf86Modes.c
+++ b/src/i830_xf86Modes.c
@@ -636,13 +636,20 @@ i830xf86GetMonitorModes (ScrnInfoPtr pSc
* Build a mode list containing all of the default modes
*/
DisplayModePtr
-i830xf86GetDefaultModes (void)
+i830xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed)
{
DisplayModePtr head = NULL, prev = NULL, mode;
int i;
for (i = 0; xf86DefaultModes[i].name != NULL; i++)
{
+ DisplayModePtr defMode = &xf86DefaultModes[i];
+
+ if (!interlaceAllowed && (defMode->Flags & V_INTERLACE))
+ continue;
+ if (!doubleScanAllowed && (defMode->Flags & V_DBLSCAN))
+ continue;
+
mode = xalloc(sizeof(DisplayModeRec));
if (!mode)
continue;
diff --git a/src/i830_xf86Modes.h b/src/i830_xf86Modes.h
index 280743b..a7d0839 100644
--- a/src/i830_xf86Modes.h
+++ b/src/i830_xf86Modes.h
@@ -90,6 +90,6 @@ DisplayModePtr
i830xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor);
DisplayModePtr
-i830xf86GetDefaultModes (void);
+i830xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed);
#endif /* _I830_XF86MODES_H_ */
More information about the xorg-commit
mailing list