[PATCH xf86-video-ati 2/4] Handle ihandle == -1 in radeon_set_shared_pixmap_backing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michel Dänzer <michel.daenzer@xxxxxxx>

It means to stop using the shared pixmap backing.

Fixes crash when changing PRIME slave output configuration.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/radeon_bo_helper.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/radeon_bo_helper.c b/src/radeon_bo_helper.c
index 79e8ff1bd..1a6d54b11 100644
--- a/src/radeon_bo_helper.c
+++ b/src/radeon_bo_helper.c
@@ -454,6 +454,9 @@ Bool radeon_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle,
     uint32_t size = ppix->devKind * ppix->drawable.height;
     Bool ret = FALSE;
 
+    if (ihandle == -1)
+	return radeon_set_pixmap_bo(ppix, NULL);
+	
     bo = (struct radeon_buffer *)calloc(1, sizeof(struct radeon_buffer));
     if (!bo)
 	goto error;
-- 
2.18.0



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux