[PATCH xf86-video-ati 03/13] glamor: Can work at depth >= 15 with current xserver Git master

Michel Dänzer michel at daenzer.net
Fri Dec 21 17:48:57 UTC 2018


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

(Ported from amdgpu commit 0734cdf544ffd3f2ac8749ad0e4bf43f8a5cea50)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/radeon_bo_helper.c | 2 ++
 src/radeon_glamor.c    | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/radeon_bo_helper.c b/src/radeon_bo_helper.c
index da5a484f2..8b3e57974 100644
--- a/src/radeon_bo_helper.c
+++ b/src/radeon_bo_helper.c
@@ -39,6 +39,8 @@ radeon_get_gbm_format(int depth, int bitsPerPixel)
     case 8:
 	return GBM_FORMAT_R8;
 #endif
+    case 15:
+	return GBM_FORMAT_ARGB1555;
     case 16:
 	return GBM_FORMAT_RGB565;
     case 32:
diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index bffc89ec6..68873cc41 100644
--- a/src/radeon_glamor.c
+++ b/src/radeon_glamor.c
@@ -109,9 +109,14 @@ radeon_glamor_pre_init(ScrnInfoPtr scrn)
 			   "glamor may not work (well) with GPUs < RV515.\n");
 	}
 
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,20,99,0,0)
 	if (scrn->depth < 24) {
-		xf86DrvMsg(scrn->scrnIndex, s ? X_ERROR : X_WARNING,
-			   "glamor requires depth >= 24, disabling.\n");
+#else
+	if (scrn->depth < 15) {
+#endif
+		xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+			   "Depth %d not supported with glamor, disabling\n",
+			   scrn->depth);
 		return FALSE;
 	}
 
-- 
2.20.1



More information about the amd-gfx mailing list