xf86-video-intel: Branch 'restructure-outputs' - 2 commits - src/i830_driver.c src/i830.h src/i830_xf86Crtc.h
Keith Packard
keithp at kemper.freedesktop.org
Tue Nov 28 08:18:24 EET 2006
src/i830.h | 1 -
src/i830_driver.c | 21 ++++++++++-----------
src/i830_xf86Crtc.h | 1 +
3 files changed, 11 insertions(+), 12 deletions(-)
New commits:
diff-tree 2c8c310bd8a105dbeda5c989dca31cc766eb6bb8 (from c421724d8151d1d4578468abdbe8fe1120e373ca)
Author: Keith Packard <keithp at guitar.keithp.com>
Date: Mon Nov 27 22:18:59 2006 -0800
Driver-independent code tracks num_crtc itself, don't do it in driver.
Now that driver-independent code manages array of crtcs, let it track
the count and just have the driver compute how many there are in
a separate variable.
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 50a5da0..9207c92 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -675,12 +675,11 @@ static const xf86CrtcFuncsRec i830_crtc_
};
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-tree c421724d8151d1d4578468abdbe8fe1120e373ca (from e8d1db326388c9a112f2b8e2eff5a81210b8d6e4)
Author: Keith Packard <keithp at guitar.keithp.com>
Date: Mon Nov 27 22:15:40 2006 -0800
Move #include "randrstr.h" from i830.h to i830_xf86Crtc.h
As part of the separation of driver-dependent from driver-independent code,
the interactions with RandR are moving entirely out of the driver, which
means the driver shouldn't even know about RandR, while the
driver-independent code does.
diff --git a/src/i830.h b/src/i830.h
index e88cd43..4e8e8de 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -58,7 +58,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
#include "xf86int10.h"
#include "vbe.h"
#include "vgaHW.h"
-#include "randrstr.h"
#include "i830_xf86Crtc.h"
#ifdef XF86DRI
diff --git a/src/i830_xf86Crtc.h b/src/i830_xf86Crtc.h
index 1f9a03e..2952c8d 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;
More information about the xorg-commit
mailing list