Skip to contentSkip to conversation

Bail if there's a problem with ShadowFB

PATCH In review Michel Dänzer 2 participants 2 messages Oct 4, 2017 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bail if there's a problem with ShadowFB

From: Michel Dänzer <[email protected]>

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

---
 src/radeon_kms.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
src/radeon_kms.c +4 -3
index b982e425b..9ef51693a 100644
@@ -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,
Signature · 6 lines
2.14.2

_______________________________________________
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): 20171004091256.1412-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org

Reviewed-by Alex Deucher
#2 lore raw
Quoted 7 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Wednesday, October 04, 2017 5:13 AM
To: [email protected]
Subject: [PATCH xf86-video-ati] Bail if there's a problem with ShadowFB

Quoted 6 lines

From: Michel Dänzer <[email protected]>

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

Quoted 36 lines
---
 src/radeon_kms.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
src/radeon_kms.c +3 -2
index b982e425b..9ef51693a 100644
@@ -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;
     }
src/radeon_kms.c +1 -1
@@ -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

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