Improve AMDGPUPreInitAccel_KMS log messages
PATCH 1/1 Improve AMDGPUPreInitAccel_KMS log messages
From: Michel Dänzer <[email protected]>
Now it should always be clear in the log file why acceleration isn't enabled.
--- src/amdgpu_glamor.c | 3 --- src/amdgpu_kms.c | 23 +++++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-)
src/amdgpu_glamor.c +0 -3
@@ -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" );
src/amdgpu_kms.c +13 -10
@@ -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;
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20170608014939.3100-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 8 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Wednesday, June 07, 2017 9:50 PM
To: [email protected]
Subject: [PATCH xf86-video-amdgpu] ImproveAMDGPUPreInitAccel_KMSlog messages
Quoted 6 lines
From: Michel Dänzer <[email protected]>
Now it should always be clear in the log file why acceleration isn't enabled.
Signed-off-by Michel Dänzer <[email protected]>
Quoted 62 lines
--- src/amdgpu_glamor.c | 3 --- src/amdgpu_kms.c | 23 +++++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-)src/amdgpu_glamor.c +0
-3@@ -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" );src/amdgpu_kms.c +13
-10@@ -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;src/amdgpu_kms.c +0
-1info->shadow_fb = TRUE;if (!xf86LoadSubModule (pScrn,"shadow" )) info->shadow_fb = FALSE; --2.11.0
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx