summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <mdaenzer@redhat.com>2020-08-28 10:50:50 +0200
committerMichel Dänzer <michel@daenzer.net>2020-08-28 10:50:50 +0200
commit6bd3dc6bd8af238868154f24a37ff13cc9aa2705 (patch)
tree447d751929840c8cdde76dd8b2444b48df7391aa
parent2202cdfb0ac79591b6d3a51634e3b9f507970d55 (diff)
Check for AMDGPU_CREATE_PIXMAP_SCANOUT in amdgpu_glamor_create_pixmap
We must not call glamor_create_pixmap or fbCreatePixmap when it's set. Closes: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/issues/21
-rw-r--r--src/amdgpu_glamor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
index 409cb76..fb7a46b 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -209,7 +209,8 @@ amdgpu_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
if (!format)
return NULL;
- if (!AMDGPU_CREATE_PIXMAP_SHARED(usage)) {
+ if (!(usage & AMDGPU_CREATE_PIXMAP_SCANOUT) &&
+ !AMDGPU_CREATE_PIXMAP_SHARED(usage)) {
if (info->shadow_primary) {
if (usage != CREATE_PIXMAP_USAGE_BACKING_PIXMAP)
return fbCreatePixmap(screen, w, h, depth, usage);