[PATCH xf86-video-amdgpu] Improve AMDGPUPreInitAccel_KMS log messages
Deucher, Alexander
Alexander.Deucher at amd.com
Thu Jun 8 03:05:16 UTC 2017
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Wednesday, June 07, 2017 9:50 PM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH xf86-video-amdgpu] Improve AMDGPUPreInitAccel_KMS
> log messages
>
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Now it should always be clear in the log file why acceleration isn't
> enabled.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/amdgpu_glamor.c | 3 ---
> src/amdgpu_kms.c | 23 +++++++++++++----------
> 2 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
> index 5583cd382..197592aa0 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 69d61943d..784f7388a 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;
> --
> 2.11.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list