summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-05-03 10:52:02 +0100
committerDave Airlie <airlied@redhat.com>2012-05-03 10:52:02 +0100
commit5bff4873117fce3b2a534a6b60b805a24281b8bb (patch)
tree578e719785aaa99a7a4b84c7195ba20bc0e6e64e
parent9ea8a38eadb337688654d98dbd3c7f1ebe76c672 (diff)
isDrv->isGPU
-rw-r--r--dix/dispatch.c2
-rw-r--r--fb/fbscreen.c4
-rw-r--r--include/scrnintstr.h3
-rw-r--r--mi/micmap.c2
-rw-r--r--mi/midispcur.c4
-rw-r--r--mi/miscrinit.c2
-rw-r--r--mi/misprite.c8
7 files changed, 14 insertions, 11 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 28fcadf8b..0e3b2f77e 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -3833,7 +3833,7 @@ AddGPUScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ ,
pScreen->totalPixmapSize = 0; /* computed in CreateScratchPixmapForScreen */
pScreen->ClipNotify = 0; /* for R4 ddx compatibility */
pScreen->CreateScreenResources = 0;
- pScreen->isDrv = TRUE;
+ pScreen->isGPU = TRUE;
/*
* This loop gets run once for every Screen that gets added,
diff --git a/fb/fbscreen.c b/fb/fbscreen.c
index 708d4ed48..9d52253a1 100644
--- a/fb/fbscreen.c
+++ b/fb/fbscreen.c
@@ -139,7 +139,7 @@ fbSetupScreen(ScreenPtr pScreen, pointer pbits, /* pointer to screen bitmap */
pScreen->GetWindowPixmap = _fbGetWindowPixmap;
pScreen->SetWindowPixmap = _fbSetWindowPixmap;
- if (pScreen->isDrv) {
+ if (pScreen->isGPU) {
pScreen->GetCopyAreaFunction = fbGetCopyAreaFunction;
}
return TRUE;
@@ -222,7 +222,7 @@ fbFinishScreenInit(ScreenPtr pScreen,
fbGetScreenPrivate(pScreen)->finishWrap = finishWrap;
#endif
rootdepth = 0;
- if (!pScreen->isDrv) {
+ if (!pScreen->isGPU) {
if (!fbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, &rootdepth,
&defaultVisual, ((unsigned long) 1 << (imagebpp - 1)),
8))
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index a670a098a..ab89cf7cc 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -499,7 +499,8 @@ typedef struct _Screen {
* default */
Bool canDoBGNoneRoot;
- Bool isDrv;
+ Bool isGPU;
+ int primary_gpu_index;
int num_gpu;
/* subscreen lists - master gpus, offload gpus, output gpus, unattached gpus */
ScreenPtr gpu[MAXGPU];
diff --git a/mi/micmap.c b/mi/micmap.c
index 22aac5577..165095360 100644
--- a/mi/micmap.c
+++ b/mi/micmap.c
@@ -276,7 +276,7 @@ miCreateDefColormap(ScreenPtr pScreen)
ColormapPtr cmap;
int alloctype;
- if (pScreen->isDrv)
+ if (pScreen->isGPU)
return TRUE;
if (!dixRegisterPrivateKey(&micmapScrPrivateKeyRec, PRIVATE_SCREEN, 0))
return FALSE;
diff --git a/mi/midispcur.c b/mi/midispcur.c
index 30546caa6..89cf48692 100644
--- a/mi/midispcur.c
+++ b/mi/midispcur.c
@@ -104,8 +104,8 @@ miDCInitialize(ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs)
{
miDCScreenPtr pScreenPriv;
- if (pScreen->isDrv)
- return TRUE;
+ // if (pScreen->isGPU)
+ // return TRUE;
if (!dixRegisterPrivateKey(&miDCScreenKeyRec, PRIVATE_SCREEN, 0) ||
!dixRegisterScreenPrivateKey(&miDCCursorBitsKeyRec, pScreen,
PRIVATE_CURSOR_BITS, 0) ||
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index b05c19b1c..7dad044c3 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -148,7 +148,7 @@ miCreateScreenResources(ScreenPtr pScreen)
/* create a pixmap with no data, then redirect it to point to
* the screen
*/
- if (!pScreen->isDrv) {
+ if (!pScreen->isGPU) {
pPixmap =
(*pScreen->CreatePixmap) (pScreen, 0, 0, pScreen->rootDepth, 0);
if (!pPixmap)
diff --git a/mi/misprite.c b/mi/misprite.c
index 3c91e67a9..bccb8e025 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -314,9 +314,11 @@ miSpriteInitialize(ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs)
free(pScreenPriv);
return FALSE;
}
- for (pVisual = pScreen->visuals;
- pVisual->vid != pScreen->rootVisual; pVisual++);
- pScreenPriv->pVisual = pVisual;
+ if (!pScreen->isGPU) {
+ for (pVisual = pScreen->visuals;
+ pVisual->vid != pScreen->rootVisual; pVisual++);
+ pScreenPriv->pVisual = pVisual;
+ }
pScreenPriv->CloseScreen = pScreen->CloseScreen;
pScreenPriv->GetImage = pScreen->GetImage;
pScreenPriv->GetSpans = pScreen->GetSpans;