Bail if there's a problem with ShadowFB

If we hit a problem while setting up ShadowFB, just carrying on trying
to set up HW acceleration instead is unlikely to work.

(Ported from radeon commit 7d435354099119234d443b07e2df1c7b9f97cf3c)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Michel Dänzer
2017-10-19 16:46:35 +02:00
committed by Michel Dänzer
parent 55396cc45c
commit b67a2b62b2

View File

@@ -1174,11 +1174,11 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
"GPU acceleration disabled, using ShadowFB\n");
}
if (!xf86LoadSubModule(pScrn, "shadow"))
return FALSE;
info->dri2.available = FALSE;
info->shadow_fb = TRUE;
if (!xf86LoadSubModule(pScrn, "shadow"))
info->shadow_fb = FALSE;
return TRUE;
}
@@ -1727,7 +1727,7 @@ Bool AMDGPUScreenInit_KMS(ScreenPtr pScreen, int argc, char **argv)
if (info->fb_shadow == NULL) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Failed to allocate shadow framebuffer\n");
info->shadow_fb = FALSE;
return FALSE;
} else {
if (!fbScreenInit(pScreen, info->fb_shadow,
pScrn->virtualX, pScrn->virtualY,