summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-10-19 16:46:35 +0200
committerMichel Dänzer <michel@daenzer.net>2017-10-20 10:33:36 +0200
commitb67a2b62b20c17db7471f5bbea591ab55806cb29 (patch)
tree9623babe1145fcbb168831b3293840f6602304cf
parent55396cc45c9aae3b1985ced1044b6b93064667c3 (diff)
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>
-rw-r--r--src/amdgpu_kms.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index e3d7d71..3598dd2 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -1174,11 +1174,11 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
"GPU acceleration disabled, using ShadowFB\n");
}
- info->dri2.available = FALSE;
- info->shadow_fb = TRUE;
if (!xf86LoadSubModule(pScrn, "shadow"))
- info->shadow_fb = FALSE;
+ return FALSE;
+ info->dri2.available = FALSE;
+ info->shadow_fb = TRUE;
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,