xf86-video-intel: Branch 'modesetting' - 4 commits - src/i830_dri.c src/i830_driver.c src/i830_randr.c
Keith Packard
keithp at kemper.freedesktop.org
Mon Nov 27 03:00:25 EET 2006
src/i830_dri.c | 2
src/i830_driver.c | 203 ------------------------------------------------------
src/i830_randr.c | 3
3 files changed, 6 insertions(+), 202 deletions(-)
New commits:
diff-tree 9aca4e207440119f4280b78199a221f85d50c511 (from 850e3652f4d5bb57f3c4ccb9cf29e2c75fecba9d)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Wed Nov 22 15:52:32 2006 -0800
Remove custom configuration code (which was #ifdef'd out).
Multi-screen configuration is moving to generic code.
diff --git a/src/i830_driver.c b/src/i830_driver.c
index aaac83e..0ae1ee6 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1240,153 +1240,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
I830PreInitDDC(pScrn);
-#if 0
- /*
- * This moves to generic RandR-based configuration code
- */
- if ((s = xf86GetOptValString(pI830->Options, OPTION_MONITOR_LAYOUT)) &&
- I830IsPrimary(pScrn)) {
- char *Mon1;
- char *Mon2;
- char *sub;
-
- Mon1 = strtok(s, ",");
- Mon2 = strtok(NULL, ",");
-
- if (Mon1) {
- sub = strtok(Mon1, "+");
- do {
- if (strcmp(sub, "NONE") == 0)
- pI830->MonType1 |= PIPE_NONE;
- else if (strcmp(sub, "CRT") == 0)
- pI830->MonType1 |= PIPE_CRT;
- else if (strcmp(sub, "TV") == 0)
- pI830->MonType1 |= PIPE_TV;
- else if (strcmp(sub, "DFP") == 0)
- pI830->MonType1 |= PIPE_DFP;
- else if (strcmp(sub, "LFP") == 0)
- pI830->MonType1 |= PIPE_LFP;
- else if (strcmp(sub, "Second") == 0)
- pI830->MonType1 |= PIPE_CRT2;
- else if (strcmp(sub, "TV2") == 0)
- pI830->MonType1 |= PIPE_TV2;
- else if (strcmp(sub, "DFP2") == 0)
- pI830->MonType1 |= PIPE_DFP2;
- else if (strcmp(sub, "LFP2") == 0)
- pI830->MonType1 |= PIPE_LFP2;
- else
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Invalid Monitor type specified for Pipe A\n");
-
- sub = strtok(NULL, "+");
- } while (sub);
- }
-
- if (Mon2) {
- sub = strtok(Mon2, "+");
- do {
- if (strcmp(sub, "NONE") == 0)
- pI830->MonType2 |= PIPE_NONE;
- else if (strcmp(sub, "CRT") == 0)
- pI830->MonType2 |= PIPE_CRT;
- else if (strcmp(sub, "TV") == 0)
- pI830->MonType2 |= PIPE_TV;
- else if (strcmp(sub, "DFP") == 0)
- pI830->MonType2 |= PIPE_DFP;
- else if (strcmp(sub, "LFP") == 0)
- pI830->MonType2 |= PIPE_LFP;
- else if (strcmp(sub, "Second") == 0)
- pI830->MonType2 |= PIPE_CRT2;
- else if (strcmp(sub, "TV2") == 0)
- pI830->MonType2 |= PIPE_TV2;
- else if (strcmp(sub, "DFP2") == 0)
- pI830->MonType2 |= PIPE_DFP2;
- else if (strcmp(sub, "LFP2") == 0)
- pI830->MonType2 |= PIPE_LFP2;
- else
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Invalid Monitor type specified for Pipe B\n");
-
- sub = strtok(NULL, "+");
- } while (sub);
- }
-
- if (pI830->num_pipes == 1 && pI830->MonType2 != PIPE_NONE) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Monitor 2 cannot be specified on single pipe devices\n");
- return FALSE;
- }
-
- if (pI830->MonType1 == PIPE_NONE && pI830->MonType2 == PIPE_NONE) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Monitor 1 and 2 cannot be type NONE\n");
- return FALSE;
- }
-
- if (pI830->MonType1 != PIPE_NONE)
- pI830->pipe = 0;
- else
- pI830->pipe = 1;
-
- } else if (I830IsPrimary(pScrn)) {
- /* Choose a default set of outputs to use based on what we've detected.
- *
- * Assume that SDVO outputs are flat panels for now. It's just a name
- * at the moment, since we don't treat different SDVO outputs
- * differently.
- */
- for (i = 0; i < pI830->num_outputs; i++) {
- if (pI830->output[i].type == I830_OUTPUT_LVDS)
- pI830->MonType2 = PIPE_LFP;
-
- if (pI830->output[i].type == I830_OUTPUT_SDVO ||
- pI830->output[i].type == I830_OUTPUT_ANALOG)
- {
- int pipetype;
-
- if (pI830->output[i].detect(pScrn, &pI830->output[i]) ==
- OUTPUT_STATUS_DISCONNECTED)
- {
- continue;
- }
-
- if (pI830->output[i].type == I830_OUTPUT_SDVO)
- pipetype = PIPE_DFP;
- else
- pipetype = PIPE_CRT;
-
- if (pI830->MonType1 == PIPE_NONE)
- pI830->MonType1 |= pipetype;
- else if (pI830->MonType2 == PIPE_NONE)
- pI830->MonType2 |= pipetype;
- }
- }
-
- /* And, if we haven't found anything (including CRT through DDC), assume
- * that there's a CRT and that the user has set up some appropriate modes
- * or something.
- */
- if (pI830->MonType1 == PIPE_NONE && pI830->MonType2 == PIPE_NONE)
- pI830->MonType1 |= PIPE_CRT;
-
- if (pI830->MonType1 != PIPE_NONE)
- pI830->pipe = 0;
- else
- pI830->pipe = 1;
-
- if (pI830->MonType1 != 0 && pI830->MonType2 != 0) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Enabling clone mode by default\n");
- pI830->Clone = TRUE;
- }
- } else {
- I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
- pI830->pipe = !pI8301->pipe;
- pI830->MonType1 = pI8301->MonType1;
- pI830->MonType2 = pI8301->MonType2;
- }
-#endif
-
if (xf86ReturnOptValBool(pI830->Options, OPTION_CLONE, FALSE)) {
if (pI830->num_pipes == 1) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -1447,31 +1300,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
pI830->pipes[i].enabled = i830PipeInUse(pScrn, i);
}
-#if 0
- pI830->CloneRefresh = 60; /* default to 60Hz */
- if (xf86GetOptValInteger(pI830->Options, OPTION_CLONE_REFRESH,
- &(pI830->CloneRefresh))) {
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Clone Monitor Refresh Rate %d\n",
- pI830->CloneRefresh);
- }
-
- /* See above i830refreshes on why 120Hz is commented out */
- if (pI830->CloneRefresh < 60 || pI830->CloneRefresh > 85 /* 120 */) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Bad Clone Refresh Rate\n");
- PreInitCleanup(pScrn);
- return FALSE;
- }
-
- if ((pI830->entityPrivate && I830IsPrimary(pScrn)) || pI830->Clone) {
- if (pI830->MonType1 == PIPE_NONE || pI830->MonType2 == PIPE_NONE) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Monitor 1 or Monitor 2 "
- "cannot be type NONE in DualHead or Clone setup.\n");
- PreInitCleanup(pScrn);
- return FALSE;
- }
- }
-#endif
-
pI830->rotation = RR_Rotate_0;
if ((s = xf86GetOptValString(pI830->Options, OPTION_ROTATE))) {
pI830->InitialRotation = 0;
@@ -1646,24 +1474,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
}
}
-#if 0
- if (xf86IsEntityShared(pScrn->entityList[0])) {
- if (!I830IsPrimary(pScrn)) {
- /* This could be made to work with a little more fiddling */
- pI830->directRenderingDisabled = TRUE;
-
- xf86DrvMsg(pScrn->scrnIndex, from, "Secondary head is using Pipe %s\n",
- pI830->pipe ? "B" : "A");
- } else {
- xf86DrvMsg(pScrn->scrnIndex, from, "Primary head is using Pipe %s\n",
- pI830->pipe ? "B" : "A");
- }
- } else {
- xf86DrvMsg(pScrn->scrnIndex, from, "Display is using Pipe %s\n",
- pI830->pipe ? "B" : "A");
- }
-#endif
-
/* Alloc our pointers for the primary head */
if (I830IsPrimary(pScrn)) {
pI830->LpRing = xalloc(sizeof(I830RingBuffer));
@@ -3561,11 +3371,6 @@ I830EnterVT(int scrnIndex, int flags)
I830DRISetVBlankInterrupt (pScrn, TRUE);
#endif
-#if 0
- if (!i830SetMode(pScrn, pScrn->currentMode))
- return FALSE;
-#endif
-
#ifdef I830_XV
I830VideoSwitchModeAfter(pScrn, pScrn->currentMode);
#endif
diff-tree 850e3652f4d5bb57f3c4ccb9cf29e2c75fecba9d (from 659e3db925de91954421f7f33c072576dfefcc4a)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Wed Nov 22 15:36:43 2006 -0800
Note which pipe has failed to be configured for VBlank interrupt
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 6b17f46..3b02918 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1526,7 +1526,7 @@ I830DRISetVBlankInterrupt (ScrnInfoPtr p
}
if (drmCommandWrite(pI830->drmSubFD, DRM_I830_SET_VBLANK_PIPE,
&pipe, sizeof (pipe))) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "I830 Vblank Pipe Setup Failed\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "I830 Vblank Pipe Setup Failed %d\n", pipe.pipe);
return FALSE;
}
}
diff-tree 659e3db925de91954421f7f33c072576dfefcc4a (from 03c12f866529230df7a1503de61954cd5ade242e)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Wed Nov 22 15:35:59 2006 -0800
Set up maximum screen size for clone instead of panorama.
This avoids heading past the 8Kbyte stride limit of DRI so
that 3D will be available by default.
diff --git a/src/i830_randr.c b/src/i830_randr.c
index d8e2261..a530ffb 100644
--- a/src/i830_randr.c
+++ b/src/i830_randr.c
@@ -1183,7 +1183,8 @@ I830RRDefaultScreenLimits (RROutputPtr *
}
}
}
- width += crtc_width;
+ if (crtc_width > width)
+ width = crtc_width;
if (crtc_height > height)
height = crtc_height;
}
diff-tree 03c12f866529230df7a1503de61954cd5ade242e (from a0a9d1ea2ac9a0c665e5a1de5b8b8358dee3b9b4)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Wed Nov 22 15:34:03 2006 -0800
Limit DRI use to cases when pitch < 8Kbytes, not 4096 pixels.
3D rendering pipeline is limited to pitch of 8Kbytes and not 4096
pixels, which rather makes a difference at 32bpp.
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 5dcd596..aaac83e 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -661,10 +661,8 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
} else {
i830_dvo_init(pScrn);
}
-#if 1
if (IS_I915GM(pI830) || IS_I945GM(pI830))
i830_tv_init(pScrn);
-#endif
}
static void
@@ -1915,9 +1913,9 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
#endif
pI830->disableTiling = TRUE; /* no DRI - so disableTiling */
- if (pScrn->displayWidth >= 4096) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Cannot support > 1024x768 in leftof/rightof configurations. disabling DRI.\n");
- pI830->directRenderingDisabled = TRUE;
+ if (pScrn->displayWidth * pI830->cpp > 8192) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Cannot support frame buffer stride > 8K > DRI.\n");
+ pI830->disableTiling = TRUE;
}
if (pScrn->virtualY > 2048) {
More information about the xorg-commit
mailing list