summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-06-08 10:46:26 +0900
committerMichel Dänzer <michel@daenzer.net>2017-06-08 10:46:26 +0900
commitbbdac40e2af472d37aa0f4f26df77a0b1b12a830 (patch)
tree0585d1490ff5be3d5a16e984460b269af1aba1cd
parentb09fde0d81e07fbe96139289098b4d4b9f5e3c35 (diff)
Improve AMDGPUPreInitAccel_KMS log messages
Now it should always be clear in the log file why acceleration isn't enabled. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/amdgpu_glamor.c3
-rw-r--r--src/amdgpu_kms.c23
2 files changed, 13 insertions, 13 deletions
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
index 5583cd3..197592a 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -81,9 +81,6 @@ Bool amdgpu_glamor_pre_init(ScrnInfoPtr scrn)
pointer glamor_module;
CARD32 version;
- if (!info->dri2.available)
- return FALSE;
-
if (scrn->depth < 24) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"glamor requires depth >= 24, disabling.\n");
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 69d6194..784f738 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -1191,19 +1191,22 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
if (info->dri2.available)
info->gbm = gbm_create_device(pAMDGPUEnt->fd);
- if (info->gbm == NULL)
- info->dri2.available = FALSE;
- if (use_glamor &&
- amdgpu_glamor_pre_init(pScrn))
- return TRUE;
-
- if (info->dri2.available)
- return TRUE;
+ if (info->gbm) {
+ if (!use_glamor ||
+ amdgpu_glamor_pre_init(pScrn))
+ return TRUE;
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "gbm_create_device returned NULL, using "
+ "ShadowFB\n");
+ }
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+ "GPU acceleration disabled, using ShadowFB\n");
}
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "GPU accel disabled or not working, using shadowfb for KMS\n");
+ info->dri2.available = FALSE;
info->shadow_fb = TRUE;
if (!xf86LoadSubModule(pScrn, "shadow"))
info->shadow_fb = FALSE;