Skip to contentSkip to conversation

If glamor is too old for depth 30, fall back to ShadowFB

PATCH In review Michel Dänzer 2 participants 2 messages Feb 14, 2018 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 If glamor is too old for depth 30, fall back to ShadowFB

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

Instead of not starting up at all.

---
 src/amdgpu_kms.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
src/amdgpu_kms.c +9 -7
index 15adb2938..e1aae9952 100644
@@ -1083,14 +1083,7 @@ static Bool AMDGPUPreInitVisual(ScrnInfoPtr pScrn)
 	case 15:
 	case 16:
 	case 24:
-		break;
-
 	case 30:
-		if (xorgGetVersion() < XORG_VERSION_NUMERIC(1,19,99,1,0)) {
-			xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-				   "Depth 30 requires Xorg >= 1.19.99.1\n");
-			return FALSE;
-		}
 		break;
 
 	default:
@@ -1173,6 +1166,14 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
 			use_glamor = FALSE;
 #endif
 
+		if (pScrn->depth == 30 && use_glamor &&
+		    xorgGetVersion() < XORG_VERSION_NUMERIC(1,19,99,1,0)) {
+			xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+				   "Depth 30 is not supported by GLAMOR with "
+				   "Xorg < 1.19.99.1\n");
+			goto shadowfb;
+		}
+
 #ifdef DRI2
 		info->dri2.available = ! !xf86LoadSubModule(pScrn, "dri2");
 #endif
@@ -1190,6 +1191,7 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
 				   "ShadowFB\n");
 		}
 	} else {
+shadowfb:
 		xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
 			   "GPU acceleration disabled, using ShadowFB\n");
 	}
Signature · 6 lines
2.16.1

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

Reviewed-by
#2 lore raw
Quoted 5 lines · Michel Dänzer

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

Instead of not starting up at all.

Quoted 49 lines
---
 src/amdgpu_kms.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
src/amdgpu_kms.c +9 -8
index 15adb2938..e1aae9952 100644
@@ -1083,14 +1083,7 @@ static Bool AMDGPUPreInitVisual(ScrnInfoPtr pScrn)
        case 15:
        case 16:
        case 24:
-               break;
-
        case 30:
-               if (xorgGetVersion() < XORG_VERSION_NUMERIC(1,19,99,1,0)) {
-                       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-                                  "Depth 30 requires Xorg >= 1.19.99.1\n");
-                       return FALSE;
-               }
                break;
 
        default:
@@ -1173,6 +1166,14 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
                        use_glamor = FALSE;
 #endif
 
+               if (pScrn->depth == 30 && use_glamor &&
+                   xorgGetVersion() < XORG_VERSION_NUMERIC(1,19,99,1,0)) {
+                       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+                                  "Depth 30 is not supported by GLAMOR with "
+                                  "Xorg < 1.19.99.1\n");
+                       goto shadowfb;
+               }
+
 #ifdef DRI2
                info->dri2.available = ! !xf86LoadSubModule(pScrn, "dri2");
 #endif
@@ -1190,6 +1191,7 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
                                   "ShadowFB\n");
                }
        } else {
+shadowfb:
                xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
                           "GPU acceleration disabled, using ShadowFB\n");
        }
--

2.16.1

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