summaryrefslogtreecommitdiff
path: root/driver/xf86-video-intel/src/i830_dvo.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-10-12 15:20:52 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-10-12 15:20:52 +0000
commit4ea16cf5c55753ffb2a8c10fc0bb37494f78f2c9 (patch)
treec46651e048fe64f802a0d212d642a996fe90fd80 /driver/xf86-video-intel/src/i830_dvo.c
parent2d9c17f9e009689f18e4bfa712057a7006f43185 (diff)
xf86-video-intel 2.4.2. Has been in snapshots for weeks. Ok oga@.
Diffstat (limited to 'driver/xf86-video-intel/src/i830_dvo.c')
-rw-r--r--driver/xf86-video-intel/src/i830_dvo.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/driver/xf86-video-intel/src/i830_dvo.c b/driver/xf86-video-intel/src/i830_dvo.c
index 9e8217105..832c76256 100644
--- a/driver/xf86-video-intel/src/i830_dvo.c
+++ b/driver/xf86-video-intel/src/i830_dvo.c
@@ -165,8 +165,9 @@ i830_dvo_restore(xf86OutputPtr output)
static int
i830_dvo_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
{
+ ScrnInfoPtr pScrn = output->scrn;
+ I830Ptr pI830 = I830PTR(pScrn);
I830OutputPrivatePtr intel_output = output->driver_private;
- struct _I830DVODriver *drv = intel_output->i2c_drv;
void *dev_priv = intel_output->i2c_drv->dev_priv;
if (pMode->Flags & V_DBLSCAN)
@@ -174,10 +175,10 @@ i830_dvo_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
/* XXX: Validate clock range */
- if (drv->panel_fixed_mode) {
- if (pMode->HDisplay > drv->panel_fixed_mode->HDisplay)
+ if (pI830->lvds_fixed_mode) {
+ if (pMode->HDisplay > pI830->lvds_fixed_mode->HDisplay)
return MODE_PANEL;
- if (pMode->VDisplay > drv->panel_fixed_mode->VDisplay)
+ if (pMode->VDisplay > pI830->lvds_fixed_mode->VDisplay)
return MODE_PANEL;
}
@@ -188,24 +189,25 @@ static Bool
i830_dvo_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
DisplayModePtr adjusted_mode)
{
+ ScrnInfoPtr pScrn = output->scrn;
+ I830Ptr pI830 = I830PTR(pScrn);
I830OutputPrivatePtr intel_output = output->driver_private;
- struct _I830DVODriver *drv = intel_output->i2c_drv;
/* If we have timings from the BIOS for the panel, put them in
* to the adjusted mode. The CRTC will be set up for this mode,
* with the panel scaling set up to source from the H/VDisplay
* of the original mode.
*/
- if (drv->panel_fixed_mode != NULL) {
- adjusted_mode->HDisplay = drv->panel_fixed_mode->HDisplay;
- adjusted_mode->HSyncStart = drv->panel_fixed_mode->HSyncStart;
- adjusted_mode->HSyncEnd = drv->panel_fixed_mode->HSyncEnd;
- adjusted_mode->HTotal = drv->panel_fixed_mode->HTotal;
- adjusted_mode->VDisplay = drv->panel_fixed_mode->VDisplay;
- adjusted_mode->VSyncStart = drv->panel_fixed_mode->VSyncStart;
- adjusted_mode->VSyncEnd = drv->panel_fixed_mode->VSyncEnd;
- adjusted_mode->VTotal = drv->panel_fixed_mode->VTotal;
- adjusted_mode->Clock = drv->panel_fixed_mode->Clock;
+ if (pI830->lvds_fixed_mode != NULL) {
+ adjusted_mode->HDisplay = pI830->lvds_fixed_mode->HDisplay;
+ adjusted_mode->HSyncStart = pI830->lvds_fixed_mode->HSyncStart;
+ adjusted_mode->HSyncEnd = pI830->lvds_fixed_mode->HSyncEnd;
+ adjusted_mode->HTotal = pI830->lvds_fixed_mode->HTotal;
+ adjusted_mode->VDisplay = pI830->lvds_fixed_mode->VDisplay;
+ adjusted_mode->VSyncStart = pI830->lvds_fixed_mode->VSyncStart;
+ adjusted_mode->VSyncEnd = pI830->lvds_fixed_mode->VSyncEnd;
+ adjusted_mode->VTotal = pI830->lvds_fixed_mode->VTotal;
+ adjusted_mode->Clock = pI830->lvds_fixed_mode->Clock;
xf86SetModeCrtc(adjusted_mode, INTERLACE_HALVE_V);
}
@@ -287,8 +289,9 @@ i830_dvo_detect(xf86OutputPtr output)
static DisplayModePtr
i830_dvo_get_modes(xf86OutputPtr output)
{
+ ScrnInfoPtr pScrn = output->scrn;
+ I830Ptr pI830 = I830PTR(pScrn);
I830OutputPrivatePtr intel_output = output->driver_private;
- struct _I830DVODriver *drv = intel_output->i2c_drv;
DisplayModePtr modes;
/* We should probably have an i2c driver get_modes function for those
@@ -307,8 +310,8 @@ i830_dvo_get_modes(xf86OutputPtr output)
return modes;
}
- if (drv->panel_fixed_mode != NULL)
- return xf86DuplicateMode(drv->panel_fixed_mode);
+ if (pI830->lvds_fixed_mode != NULL)
+ return xf86DuplicateMode(pI830->lvds_fixed_mode);
return NULL;
}
@@ -530,8 +533,8 @@ i830_dvo_init(ScrnInfoPtr pScrn)
* so for now, just get the current mode being output through
* DVO.
*/
- drv->panel_fixed_mode = i830_dvo_get_current_mode(output);
- drv->panel_wants_dither = TRUE;
+ pI830->lvds_fixed_mode = i830_dvo_get_current_mode(output);
+ pI830->lvds_dither = TRUE;
}
return;