summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-10-05 12:35:37 +0200
committerMichel Dänzer <michel@daenzer.net>2018-10-29 10:57:03 +0100
commit0734cdf544ffd3f2ac8749ad0e4bf43f8a5cea50 (patch)
tree2c40afde739d33a5721079b98bbe26f69c7ba486 /src
parentad6dfb0124860cf67730bde85867f81d9258c84d (diff)
glamor: Can work at depth >= 15 with current xserver Git master
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/amdgpu_bo_helper.c2
-rw-r--r--src/amdgpu_glamor.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c
index ea51822..6f7d6df 100644
--- a/src/amdgpu_bo_helper.c
+++ b/src/amdgpu_bo_helper.c
@@ -38,6 +38,8 @@ amdgpu_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/amdgpu_glamor.c b/src/amdgpu_glamor.c
index f91ee3a..316870a 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -77,11 +77,17 @@ Bool amdgpu_glamor_pre_init(ScrnInfoPtr scrn)
pointer glamor_module;
CARD32 version;
+#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, X_ERROR,
- "glamor requires depth >= 24, disabling.\n");
+ "Depth %d not supported with glamor, disabling\n",
+ scrn->depth);
return FALSE;
}
+
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,15,0,0,0)
if (!xf86LoaderCheckSymbol("glamor_egl_init")) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,