summaryrefslogtreecommitdiff
path: root/src/i830_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i830_driver.c')
-rw-r--r--src/i830_driver.c76
1 files changed, 62 insertions, 14 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c
index ffa93f8e..fc768af9 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1342,15 +1342,49 @@ I830UpdateXineramaScreenInfo(ScrnInfoPtr pScrn1)
Bool infochanged = FALSE;
Bool usenonrect = pI830->NonRect;
const char *rectxine = "\t... setting up rectangular Xinerama layout\n";
+#ifdef XF86DRI
+ drmI830Sarea *sarea;
+
+ if (pI830->directRenderingEnabled) {
+ sarea = (drmI830Sarea *) DRIGetSAREAPrivate(pScrn1->pScreen);
+ }
+#endif
pI830->MBXNR1XMAX = pI830->MBXNR1YMAX = pI830->MBXNR2XMAX = pI830->MBXNR2YMAX = 65536;
pI830->HaveNonRect = pI830->HaveOffsRegions = FALSE;
- if(!pI830->MergedFB) return;
+ if(!pI830->MergedFB) {
+#ifdef XF86DRI
+ if (pI830->directRenderingEnabled) {
+ sarea->pipeA_x = sarea->pipeA_y = sarea->pipeB_x = sarea->pipeB_y = 0;
+
+ if (pI830->planeEnabled[0]) {
+ sarea->pipeA_w = pScrn1->virtualX;
+ sarea->pipeA_h = pScrn1->virtualY;
+ } else {
+ sarea->pipeA_w = 0;
+ sarea->pipeA_h = 0;
+ }
- if(I830noPanoramiXExtension) return;
+ if (pI830->planeEnabled[1]) {
+ sarea->pipeB_w = pScrn1->virtualX;
+ sarea->pipeB_h = pScrn1->virtualY;
+ } else {
+ sarea->pipeB_w = 0;
+ sarea->pipeB_h = 0;
+ }
+ }
+#endif
- if(!I830XineramadataPtr) return;
+ return;
+ }
+
+ if (I830noPanoramiXExtension || !I830XineramadataPtr) {
+#ifdef XF86DRI
+ if (!pI830->directRenderingEnabled)
+#endif
+ return;
+ }
if(pI830->SecondIsScrn0) {
scrnnum1 = 1;
@@ -1631,14 +1665,30 @@ I830UpdateXineramaScreenInfo(ScrnInfoPtr pScrn1)
}
- I830XineramadataPtr[scrnnum1].x = x1;
- I830XineramadataPtr[scrnnum1].y = y1;
- I830XineramadataPtr[scrnnum1].width = w1;
- I830XineramadataPtr[scrnnum1].height = h1;
- I830XineramadataPtr[scrnnum2].x = x2;
- I830XineramadataPtr[scrnnum2].y = y2;
- I830XineramadataPtr[scrnnum2].width = w2;
- I830XineramadataPtr[scrnnum2].height = h2;
+#ifdef XF86DRI
+ if (pI830->directRenderingEnabled) {
+ sarea->pipeA_x = x1;
+ sarea->pipeA_y = y1;
+ sarea->pipeA_w = w1;
+ sarea->pipeA_h = h1;
+ sarea->pipeB_x = x2;
+ sarea->pipeB_y = y2;
+ sarea->pipeB_w = w2;
+ sarea->pipeB_h = h2;
+ }
+#endif
+
+ if (I830XineramadataPtr && !I830noPanoramiXExtension) {
+ I830XineramadataPtr[scrnnum1].x = x1;
+ I830XineramadataPtr[scrnnum1].y = y1;
+ I830XineramadataPtr[scrnnum1].width = w1;
+ I830XineramadataPtr[scrnnum1].height = h1;
+ I830XineramadataPtr[scrnnum2].x = x2;
+ I830XineramadataPtr[scrnnum2].y = y2;
+ I830XineramadataPtr[scrnnum2].width = w2;
+ I830XineramadataPtr[scrnnum2].height = h2;
+ } else
+ return;
if(infochanged) {
xf86DrvMsg(pScrn1->scrnIndex, X_INFO,
@@ -8186,9 +8236,7 @@ I830BIOSSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
/* Since RandR (indirectly) uses SwitchMode(), we need to
* update our Xinerama info here, too, in case of resizing
*/
- if(pI830->MergedFB) {
- I830UpdateXineramaScreenInfo(pScrn);
- }
+ I830UpdateXineramaScreenInfo(pScrn);
return ret;
}