1 diff --git a/src/nv_driver.c b/src/nv_driver.c
2 index 4bcc391..6252dd2 100644
9 +#define NV_ALIGN(x,bytes) (((x) + ((bytes) - 1)) & ~((bytes) - 1))
11 const OptionInfoRec * RivaAvailableOptions(int chipid, int busid);
12 Bool RivaGetScrnInfoRec(PciChipsets *chips, int chip);
13 Bool G80GetScrnInfoRec(PciChipsets *chips, int chip);
14 @@ -2266,7 +2268,7 @@ NVScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
15 unsigned char *FBStart;
16 int width, height, displayWidth, offscreenHeight, shadowHeight;
21 * First get the ScrnInfoRec
23 @@ -2421,7 +2423,31 @@ NVScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
25 AvailFBArea.x2 = pScrn->displayWidth;
26 AvailFBArea.y2 = offscreenHeight;
27 - xf86InitFBManager(pScreen, &AvailFBArea);
30 + if (!xf86InitFBManager(pScreen, &AvailFBArea)) {
31 + xf86DrvMsg(scrnIndex, X_ERROR,
32 + "Memory manager initialized to (%d,%d) (%d,%d) failed\n",
33 + AvailFBArea.x1, AvailFBArea.y1, AvailFBArea.x2, AvailFBArea.y2);
37 + xf86DrvMsg(scrnIndex, X_INFO,
38 + "Memory manager initialized to (%d,%d) (%d,%d)\n",
39 + AvailFBArea.x1, AvailFBArea.y1, AvailFBArea.x2, AvailFBArea.y2);
41 + if ((fbarea = xf86AllocateOffscreenArea(pScreen,
42 + pScrn->displayWidth,
43 + NV_ALIGN(pScrn->virtualY, 64) -
44 + pScrn->virtualY + 2,
45 + 0, NULL, NULL, NULL))) {
46 + xf86DrvMsg(scrnIndex, X_INFO,
47 + "Reserved area from (%d,%d) to (%d,%d)\n",
48 + fbarea->box.x1, fbarea->box.y1,
49 + fbarea->box.x2, fbarea->box.y2);
51 + xf86DrvMsg(scrnIndex, X_ERROR, "Unable to reserve area\n");