All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH xf86-video-ati] Bail if there's a problem with ShadowFB
@ 2017-10-04  9:12 Michel Dänzer
       [not found] ` <20171004091256.1412-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Michel Dänzer @ 2017-10-04  9:12 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Michel Dänzer <michel.daenzer@amd.com>

If we hit a problem while setting up ShadowFB, just carying on trying
to set up HW acceleration instead is unlikely to work.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 src/radeon_kms.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index b982e425b..9ef51693a 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1331,9 +1331,10 @@ static Bool RADEONPreInitAccel_KMS(ScrnInfoPtr pScrn)
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 		   "GPU accel disabled or not working, using shadowfb for KMS\n");
 shadowfb:
-	info->r600_shadow_fb = TRUE;
 	if (!xf86LoadSubModule(pScrn, "shadow"))
-	    info->r600_shadow_fb = FALSE;
+	    return FALSE;
+
+	info->r600_shadow_fb = TRUE;
 	return TRUE;
     }
 
@@ -2215,7 +2216,7 @@ Bool RADEONScreenInit_KMS(ScreenPtr pScreen, int argc, char **argv)
 	if (info->fb_shadow == NULL) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
                        "Failed to allocate shadow framebuffer\n");
-	    info->r600_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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH xf86-video-ati] Bail if there's a problem with ShadowFB
       [not found] ` <20171004091256.1412-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2017-10-04 11:59   ` Deucher, Alexander
  0 siblings, 0 replies; 2+ messages in thread
From: Deucher, Alexander @ 2017-10-04 11:59 UTC (permalink / raw)
  To: 'Michel Dänzer', amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Wednesday, October 04, 2017 5:13 AM
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH xf86-video-ati] Bail if there's a problem with ShadowFB
> 
> From: Michel Dänzer <michel.daenzer@amd.com>
> 
> If we hit a problem while setting up ShadowFB, just carying on trying
> to set up HW acceleration instead is unlikely to work.
> 
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  src/radeon_kms.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/src/radeon_kms.c b/src/radeon_kms.c
> index b982e425b..9ef51693a 100644
> --- a/src/radeon_kms.c
> +++ b/src/radeon_kms.c
> @@ -1331,9 +1331,10 @@ static Bool RADEONPreInitAccel_KMS(ScrnInfoPtr
> pScrn)
>  	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
>  		   "GPU accel disabled or not working, using shadowfb for
> KMS\n");
>  shadowfb:
> -	info->r600_shadow_fb = TRUE;
>  	if (!xf86LoadSubModule(pScrn, "shadow"))
> -	    info->r600_shadow_fb = FALSE;
> +	    return FALSE;
> +
> +	info->r600_shadow_fb = TRUE;
>  	return TRUE;
>      }
> 
> @@ -2215,7 +2216,7 @@ Bool RADEONScreenInit_KMS(ScreenPtr pScreen,
> int argc, char **argv)
>  	if (info->fb_shadow == NULL) {
>  	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
>                         "Failed to allocate shadow framebuffer\n");
> -	    info->r600_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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-04 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-04  9:12 [PATCH xf86-video-ati] Bail if there's a problem with ShadowFB Michel Dänzer
     [not found] ` <20171004091256.1412-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-10-04 11:59   ` Deucher, Alexander

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.