summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2017-08-05 21:34:31 +0700
committerAaron Plattner <aplattner@nvidia.com>2017-08-05 16:46:27 -0700
commit33e68185665b2d065525ac03332f080026b18d8d (patch)
treeccd64769cceb4f67ff92449b9ad23ee3c2ec8f6f
parent87249af5faf85c8d093e910c069faa4db0aee843 (diff)
Get rid of dPtr->FBBase
The pointer to the screen's pixels is stored in the screen pixmap's devPrivate.ptr field. Just use that instead of storing it redundantly. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Bob Terek <xorg@esoterek.com> Tested-by: Antoine Martin <antoine@nagafix.co.uk>
-rw-r--r--src/dummy.h1
-rw-r--r--src/dummy_cursor.c2
-rw-r--r--src/dummy_driver.c11
3 files changed, 5 insertions, 9 deletions
diff --git a/src/dummy.h b/src/dummy.h
index f902fa6..82fbdea 100644
--- a/src/dummy.h
+++ b/src/dummy.h
@@ -50,7 +50,6 @@ typedef struct dummyRec
int cursorFG, cursorBG;
dummy_colors colors[256];
- pointer* FBBase;
Bool (*CreateWindow)() ; /* wrapped CreateWindow */
Bool prop;
} DUMMYRec, *DUMMYPtr;
diff --git a/src/dummy_cursor.c b/src/dummy_cursor.c
index 07a89bf..d7c67c6 100644
--- a/src/dummy_cursor.c
+++ b/src/dummy_cursor.c
@@ -39,8 +39,6 @@ dummySetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
{
DUMMYPtr dPtr = DUMMYPTR(pScrn);
-/* unsigned char *_dest = ((unsigned char *)dPtr->FBBase + */
-/* pScrn->videoRam * 1024 - 1024); */
dPtr->cursorX = x;
dPtr->cursorY = y;
}
diff --git a/src/dummy_driver.c b/src/dummy_driver.c
index 6653883..03fa1d7 100644
--- a/src/dummy_driver.c
+++ b/src/dummy_driver.c
@@ -501,7 +501,8 @@ DUMMYScreenInit(SCREEN_INIT_ARGS_DECL)
DUMMYPtr dPtr;
int ret;
VisualPtr visual;
-
+ void *pixels;
+
/*
* we need to get the ScrnInfoRec for this screen, so let's allocate
* one first thing
@@ -511,7 +512,7 @@ DUMMYScreenInit(SCREEN_INIT_ARGS_DECL)
DUMMYScrn = pScrn;
- if (!(dPtr->FBBase = malloc(pScrn->videoRam * 1024)))
+ if (!(pixels = malloc(pScrn->videoRam * 1024)))
return FALSE;
/*
@@ -532,7 +533,7 @@ DUMMYScreenInit(SCREEN_INIT_ARGS_DECL)
* Call the framebuffer layer's ScreenInit function, and fill in other
* pScreen fields.
*/
- ret = fbScreenInit(pScreen, dPtr->FBBase,
+ ret = fbScreenInit(pScreen, pixels,
pScrn->virtualX, pScrn->virtualY,
pScrn->xDpi, pScrn->yDpi,
pScrn->displayWidth, pScrn->bitsPerPixel);
@@ -644,9 +645,7 @@ DUMMYCloseScreen(CLOSE_SCREEN_ARGS_DECL)
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
DUMMYPtr dPtr = DUMMYPTR(pScrn);
- if(pScrn->vtSema){
- free(dPtr->FBBase);
- }
+ free(pScreen->GetScreenPixmap(pScreen)->devPrivate.ptr);
if (dPtr->CursorInfo)
xf86DestroyCursorInfoRec(dPtr->CursorInfo);