summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-02-11 08:39:49 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-02-11 08:39:49 +1000
commitf7deabfec0dcec4f203f85cd8494a70fe8fa6ebb (patch)
tree2d41a57a74d9192f61ca36709008231524bff096
parent43524fcbb786c5b9e9ec25776560790aec208719 (diff)
Pass pScreen to drmmode_fbcon_copy()
-rw-r--r--src/drmmode_display.c13
-rw-r--r--src/nv_driver.c6
-rw-r--r--src/nv_proto.h2
3 files changed, 11 insertions, 10 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 7c45d9c..a797efe 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -159,8 +159,9 @@ drmmode_crtc_dpms(xf86CrtcPtr drmmode_crtc, int mode)
}
void
-drmmode_fbcon_copy(ScrnInfoPtr pScrn)
+drmmode_fbcon_copy(ScreenPtr pScreen)
{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
NVPtr pNv = NVPTR(pScrn);
ExaDriverPtr exa = pNv->EXADriverPtr;
@@ -212,7 +213,7 @@ drmmode_fbcon_copy(ScrnInfoPtr pScrn)
return;
}
- pspix = drmmode_pixmap_wrap(pScrn->pScreen, fb->width, fb->height,
+ pspix = drmmode_pixmap_wrap(pScreen, fb->width, fb->height,
fb->depth, fb->bpp, fb->pitch, bo);
nouveau_bo_ref(NULL, &bo);
drmFree(fb);
@@ -222,14 +223,14 @@ drmmode_fbcon_copy(ScrnInfoPtr pScrn)
return;
}
- pdpix = drmmode_pixmap_wrap(pScrn->pScreen, pScrn->virtualX,
+ pdpix = drmmode_pixmap_wrap(pScreen, pScrn->virtualX,
pScrn->virtualY, pScrn->depth,
pScrn->bitsPerPixel, pScrn->displayWidth *
pScrn->bitsPerPixel / 8, pNv->scanout);
if (!pdpix) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Failed to init scanout pixmap for fbcon mirror\n");
- pScrn->pScreen->DestroyPixmap(pspix);
+ pScreen->DestroyPixmap(pspix);
return;
}
@@ -244,8 +245,8 @@ drmmode_fbcon_copy(ScrnInfoPtr pScrn)
nouveau_bo_map(pNv->scanout, NOUVEAU_BO_RDWR);
nouveau_bo_unmap(pNv->scanout);
- pScrn->pScreen->DestroyPixmap(pdpix);
- pScrn->pScreen->DestroyPixmap(pspix);
+ pScreen->DestroyPixmap(pdpix);
+ pScreen->DestroyPixmap(pspix);
}
static Bool
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 3908347..24a1d15 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -1142,12 +1142,12 @@ NVScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
pNv->BlockHandler = pScreen->BlockHandler;
pScreen->BlockHandler = NVBlockHandler;
- pScrn->vtSema = TRUE;
- pScrn->pScreen = pScreen;
- drmmode_fbcon_copy(pScrn);
+ drmmode_fbcon_copy(pScreen);
if (!NVEnterVT(pScrn->scrnIndex, 0))
return FALSE;
+ pScrn->vtSema = TRUE;
+ pScrn->pScreen = pScreen;
xf86DPMSInit(pScreen, xf86DPMSSet, 0);
diff --git a/src/nv_proto.h b/src/nv_proto.h
index f8854e3..9534f4e 100644
--- a/src/nv_proto.h
+++ b/src/nv_proto.h
@@ -6,7 +6,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp);
void drmmode_adjust_frame(ScrnInfoPtr pScrn, int x, int y, int flags);
void drmmode_remove_fb(ScrnInfoPtr pScrn);
Bool drmmode_cursor_init(ScreenPtr pScreen);
-void drmmode_fbcon_copy(ScrnInfoPtr pScrn);
+void drmmode_fbcon_copy(ScreenPtr pScreen);
/* in nv_accel_common.c */
Bool NVAccelCommonInit(ScrnInfoPtr pScrn);