[PATCH 08/11] modesetting: Properly clean up w/ PRIME syncing
Alex Goins
agoins at nvidia.com
Wed Nov 25 18:39:32 PST 2015
With PRIME synchronization, there is a second scanout buffer,
scanout_pixmap_back, that needs to be cleaned up when destroying scanout
pixmaps. PRIME synchronization currently shouldn't apply to reverse PRIME,
so only apply to scanout_pixmap_cpu().
Signed-off-by: Alex Goins <agoins at nvidia.com>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 0d34ca1..3bbf0d3 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -630,6 +630,12 @@ drmmode_set_scanout_pixmap_cpu(xf86CrtcPtr crtc, PixmapPtr ppix)
if (crtc->randr_crtc->scanout_pixmap) {
ppriv = msGetPixmapPriv(drmmode, crtc->randr_crtc->scanout_pixmap);
drmModeRmFB(drmmode->fd, ppriv->fb_id);
+
+ if (crtc->randr_crtc->scanout_pixmap_back) {
+ ppriv = msGetPixmapPriv(drmmode,
+ crtc->randr_crtc->scanout_pixmap_back);
+ drmModeRmFB(drmmode->fd, ppriv->fb_id);
+ }
}
if (drmmode_crtc->slave_damage) {
DamageUnregister(drmmode_crtc->slave_damage);
--
1.9.1
More information about the xorg-devel
mailing list