summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-08-17 12:03:41 +0200
committerHans de Goede <hdegoede@redhat.com>2016-09-13 10:26:25 +0200
commitcb7b145a25452de8b549e8c8e9ec3bcc752e55dc (patch)
tree8c83e0a17e7b5cac66b6a97f6fb1a1bf73f15b2f
parenta74d553cb97d545148bd2f81b7bd021cca94e076 (diff)
modesetting: Fix msSharePixmapBacking returning a non-linear bo
glamor_fd_from_pixmap() may return a tiled bo, which is not suitable for sharing with another GPU as tiling usually is GPU specific. Switch to glamor_shareable_fd_from_pixmap(), which always returns a linear bo. This fixes mis-rendering when running the mode setting driver on the master gpu in a dual-gpu setup and running an opengl app with DRI_PRIME=1. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/xfree86/drivers/modesetting/driver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index 5ebb39485..a8e83b291 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -1382,7 +1382,8 @@ msSharePixmapBacking(PixmapPtr ppix, ScreenPtr screen, void **handle)
int ret;
CARD16 stride;
CARD32 size;
- ret = glamor_fd_from_pixmap(ppix->drawable.pScreen, ppix, &stride, &size);
+ ret = glamor_shareable_fd_from_pixmap(ppix->drawable.pScreen, ppix,
+ &stride, &size);
if (ret == -1)
return FALSE;