xf86-video-intel: Branch 'modesetting' - src/i830_crt.c src/i830_randr.c
Keith Packard
keithp at kemper.freedesktop.org
Thu Nov 9 07:38:04 EET 2006
src/i830_crt.c | 10 +++++++---
src/i830_randr.c | 16 +++++++++++-----
2 files changed, 18 insertions(+), 8 deletions(-)
New commits:
diff-tree 81b7b489afa2cab4d8614c64f4906be627f1d07e (from 81bace0c316c3ed80201a34eca533254d12cd193)
Author: Keith Packard <keithp at mandolin.keithp.com>
Date: Wed Nov 8 21:38:00 2006 -0800
Adapt to RandR updates that split object creation from screen association.
RandR DIX code is preparing for xf86 drivers that want to allocate RandR
objects at PreInit time. This patch adapts to that change without taking
advantage of it.
diff --git a/src/i830_crt.c b/src/i830_crt.c
index 46eb788..f067260 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -103,13 +103,17 @@ i830_crt_post_set_mode(ScrnInfoPtr pScrn
{
I830Ptr pI830 = I830PTR(pScrn);
int dpll_md_reg = (output->pipe == 0) ? DPLL_A_MD : DPLL_B_MD;
- CARD32 adpa;
+ CARD32 adpa, dpll_md;
/*
- * Not quite sure precisely what this does...
+ * Disable separate mode multiplier used when cloning SDVO to CRT
+ * XXX this needs to be adjusted when we really are cloning
*/
if (IS_I965G(pI830))
- OUTREG(dpll_md_reg, 0x3 << DPLL_MD_VGA_UDI_MULTIPLIER_SHIFT);
+ {
+ dpll_md = INREG(dpll_md_reg);
+ OUTREG(dpll_md_reg, dpll_md & ~DPLL_MD_UDI_MULTIPLIER_MASK);
+ }
adpa = ADPA_DAC_ENABLE;
diff --git a/src/i830_randr.c b/src/i830_randr.c
index 32cc877..d6e5f0b 100644
--- a/src/i830_randr.c
+++ b/src/i830_randr.c
@@ -707,7 +707,7 @@ I830RandRSetInfo12 (ScreenPtr pScreen)
modeInfo.vTotal = mode->VTotal;
modeInfo.modeFlags = mode->Flags;
- rrmode = RRModeGet (pScreen, &modeInfo, mode->name);
+ rrmode = RRModeGet (&modeInfo, mode->name);
rrmode->devPrivate = mode;
if (rrmode) {
rrmodes[nmode++] = rrmode;
@@ -787,7 +787,11 @@ I830RandRCreateScreenResources12 (Screen
*/
for (i = 0; i < pI830->num_pipes; i++)
{
- randrp->crtcs[i] = RRCrtcCreate (pScreen, (void *) i);
+ randrp->crtcs[i] = RRCrtcCreate ((void *) i);
+ if (!randrp->crtcs[i])
+ return FALSE;
+ if (!RRCrtcAttachScreen (randrp->crtcs[i], pScreen))
+ return FALSE;
RRCrtcGammaSetSize (randrp->crtcs[i], 256);
}
@@ -795,9 +799,11 @@ I830RandRCreateScreenResources12 (Screen
{
output = &pI830->output[i];
name = i830_output_type_names[output->type];
- randrp->outputs[i] = RROutputCreate (pScreen,
- name, strlen (name),
- (void *) i);
+ randrp->outputs[i] = RROutputCreate (name, strlen (name), (void *) i);
+ if (!randrp->outputs[i])
+ return FALSE;
+ if (!RROutputAttachScreen (randrp->outputs[i], pScreen))
+ return FALSE;
}
mode = pScrn->currentMode;
More information about the xorg-commit
mailing list