From ae2a450cb98707c4cab8a8265a284cf708bcd43d Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Wed, 29 Aug 2018 17:31:49 +0200 Subject: 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 --- src/amdgpu_bo_helper.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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; -- cgit v1.2.3