summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-11-30 11:39:56 -0800
committerKeith Packard <keithp@neko.keithp.com>2006-11-30 11:39:56 -0800
commitbcf206ff17c6eca8212db72dd86fcd8fdc0162da (patch)
treeae869395e42d8c588a363a81e4383ce61bf98b4c
parent27ca1c17aab30670dd1d07e0809fd58cdecfc3b6 (diff)
parent2c8c310bd8a105dbeda5c989dca31cc766eb6bb8 (diff)
Merge branch 'restructure-outputs-origin' into restructure-outputs
-rw-r--r--src/i830.h1
-rw-r--r--src/i830_driver.c21
-rw-r--r--src/i830_xf86Crtc.h1
3 files changed, 11 insertions, 12 deletions
diff --git a/src/i830.h b/src/i830.h
index 1b0b305a..14adb3cb 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -58,7 +58,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86int10.h"
#include "vbe.h"
#include "vgaHW.h"
-#include "randrstr.h"
#include "i830_xf86Crtc.h"
#include "i830_randr.h"
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 6b7439aa..b4333c48 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -675,12 +675,11 @@ static const xf86CrtcFuncsRec i830_crtc_funcs = {
};
static void
-I830SetupCrtcs(ScrnInfoPtr pScrn)
+I830SetupCrtcs(ScrnInfoPtr pScrn, int num_pipe)
{
- I830Ptr pI830 = I830PTR(pScrn);
int p;
- for (p = 0; p < pI830->xf86_config.num_crtc; p++)
+ for (p = 0; p < num_pipe; p++)
{
xf86CrtcPtr crtc = xf86CrtcCreate (pScrn, &i830_crtc_funcs);
I830CrtcPrivatePtr intel_crtc;
@@ -691,7 +690,6 @@ I830SetupCrtcs(ScrnInfoPtr pScrn)
intel_crtc->pipe = p;
crtc->driver_private = intel_crtc;
- pI830->xf86_config.crtc[p] = crtc;
}
}
@@ -835,6 +833,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
Bool enable;
const char *chipname;
int mem_skip;
+ int num_pipe;
#ifdef XF86DRI
unsigned long savedMMSize;
#endif
@@ -1142,14 +1141,14 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
}
if (pI830->PciInfo->chipType == PCI_CHIP_E7221_G)
- pI830->xf86_config.num_crtc = 1;
+ num_pipe = 1;
else
if (IS_MOBILE(pI830) || IS_I9XX(pI830))
- pI830->xf86_config.num_crtc = 2;
+ num_pipe = 2;
else
- pI830->xf86_config.num_crtc = 1;
+ num_pipe = 1;
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%d display pipe%s available.\n",
- pI830->xf86_config.num_crtc, pI830->xf86_config.num_crtc > 1 ? "s" : "");
+ num_pipe, num_pipe > 1 ? "s" : "");
/*
* Get the pre-allocated (stolen) memory size.
@@ -1268,10 +1267,10 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
I830PreInitDDC(pScrn);
I830SetupOutputs(pScrn);
- I830SetupCrtcs(pScrn);
+ I830SetupCrtcs(pScrn, num_pipe);
if (xf86ReturnOptValBool(pI830->Options, OPTION_CLONE, FALSE)) {
- if (pI830->xf86_config.num_crtc == 1) {
+ if (num_pipe == 1) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Can't enable Clone Mode because this is a single pipe device\n");
PreInitCleanup(pScrn);
@@ -1293,7 +1292,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
*/
for (i = 0; i < pI830->xf86_config.num_output; i++)
{
- xf86OutputPtr output = pI830->xf86_config.output[i];
+ xf86OutputPtr output = pI830->xf86_config.output[i];
I830OutputPrivatePtr intel_output = output->driver_private;
xf86CrtcPtr crtc;
int p;
diff --git a/src/i830_xf86Crtc.h b/src/i830_xf86Crtc.h
index 1f9a03e9..2952c8d5 100644
--- a/src/i830_xf86Crtc.h
+++ b/src/i830_xf86Crtc.h
@@ -23,6 +23,7 @@
#define _XF86CRTC_H_
#include <edid.h>
+#include "randrstr.h"
#include "i830_xf86Modes.h"
typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr;