summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-12-20 18:40:19 +0100
committerMichel Dänzer <michel@daenzer.net>2018-12-28 11:58:47 +0100
commit06957e3067b9eb38d30b32d98a07895399f4cb36 (patch)
treef48ee411965afce304eb3b933c8c1726369d36c3
parent99ac121770da53196124d80375a5c8edbcf827fa (diff)
glamor: Can work at depth >= 15 with current xserver Git master
(Ported from amdgpu commit 0734cdf544ffd3f2ac8749ad0e4bf43f8a5cea50)
-rw-r--r--src/radeon_bo_helper.c2
-rw-r--r--src/radeon_glamor.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/radeon_bo_helper.c b/src/radeon_bo_helper.c
index da5a484f..8b3e5797 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 bffc89ec..f1098381 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) {
+#else
+ if (scrn->depth < 15) {
+#endif
xf86DrvMsg(scrn->scrnIndex, s ? X_ERROR : X_WARNING,
- "glamor requires depth >= 24, disabling.\n");
+ "Depth %d not supported with glamor, disabling\n",
+ scrn->depth);
return FALSE;
}