[PATCH xf86-video-amdgpu 2/2] Bail if there's a problem with ShadowFB
Deucher, Alexander
Alexander.Deucher at amd.com
Thu Oct 19 16:58:43 UTC 2017
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Thursday, October 19, 2017 12:03 PM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH xf86-video-amdgpu 2/2] Bail if there's a problem with
> ShadowFB
>
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> 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)
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/amdgpu_kms.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
> index e3d7d71cf..3598dd23f 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,
> --
> 2.14.2
>
> _______________________________________________
> 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