summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-08-29 17:31:49 +0200
committerMichel Dänzer <michel.daenzer@amd.com>2018-08-29 17:31:49 +0200
commitae2a450cb98707c4cab8a8265a284cf708bcd43d (patch)
tree7cb59870493c79013e1b2c8e526833389547db13 /src
parent34e851d1f284da5afcfe449f349cf1eb5e962408 (diff)
Handle ihandle == -1 in amdgpu_set_shared_pixmap_backing
It means to stop using the shared pixmap backing. (Ported from radeon commit 1799680f7bd84e0618f34f4c7486799521ddaf83) Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/amdgpu_bo_helper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c
index 98eb04a..6fd6884 100644
--- a/src/amdgpu_bo_helper.c
+++ b/src/amdgpu_bo_helper.c
@@ -400,6 +400,9 @@ Bool amdgpu_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle)
uint32_t size = ppix->devKind * ppix->drawable.height;
Bool ret;
+ if (ihandle == -1)
+ return amdgpu_set_pixmap_bo(ppix, NULL);
+
if (info->gbm) {
struct amdgpu_buffer *bo;
struct gbm_import_fd_data data;