summaryrefslogtreecommitdiff
path: root/src/glamo-kms-driver.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-07-28 17:36:00 +0100
committerThomas White <taw@bitwiz.org.uk>2009-07-28 17:36:50 +0100
commit4fa134e23f682cdb57b01072ee07ee90342266b9 (patch)
tree05c4b92dd943ba42b278b2b26db8e5b21483945e /src/glamo-kms-driver.c
parent839e7e06a1e24c66233b77b50e454b286caadf93 (diff)
Initialisation no longer segfaults...
Diffstat (limited to 'src/glamo-kms-driver.c')
-rw-r--r--src/glamo-kms-driver.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/glamo-kms-driver.c b/src/glamo-kms-driver.c
index bc4d933..ac19ead 100644
--- a/src/glamo-kms-driver.c
+++ b/src/glamo-kms-driver.c
@@ -311,6 +311,15 @@ static Bool GlamoKMSCreateScreenResources(ScreenPtr pScreen)
if (!pScreen->ModifyPixmapHeader(rootPixmap, -1, -1, -1, -1, -1, NULL))
FatalError("Couldn't adjust screen pixmap\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Adding framebuffer....!\n");
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%i %i %i %i %i %i\n",
+ pGlamo->drm_fd, pScrn->virtualX, pScrn->virtualY,
+ pScrn->depth, pScrn->bitsPerPixel,
+ pScrn->displayWidth * pScrn->bitsPerPixel / 8);
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "rootPixmap = %p\n", (void *)rootPixmap);
+
drmModeAddFB(pGlamo->drm_fd,
pScrn->virtualX,
pScrn->virtualY,
@@ -319,10 +328,14 @@ static Bool GlamoKMSCreateScreenResources(ScreenPtr pScreen)
pScrn->displayWidth * pScrn->bitsPerPixel / 8,
driGetPixmapHandle(rootPixmap, &flags), &pGlamo->fb_id);
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Done\n");
+
GlamoKMSAdjustFrame(pScrn->scrnIndex,
pScrn->frameX0, pScrn->frameY0,
0);
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Finished\n");
+
return ret;
}
@@ -431,8 +444,6 @@ Bool GlamoKMSEnterVT(int scrnIndex, int flags)
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
GlamoPtr pGlamo = GlamoPTR(pScrn);
- driUnlock(pScrn->pScreen);
-
/* Only save state once per server generation since that's what most
* drivers do. Could change this to save state at each VT enter. */
if ( pGlamo->SaveGeneration != serverGeneration ) {
@@ -473,8 +484,6 @@ void GlamoKMSLeaveVT(int scrnIndex, int flags)
drmModeRmFB(pGlamo->drm_fd, pGlamo->fb_id);
- driLock(pScrn->pScreen);
-
pScrn->vtSema = FALSE;
}