[PATCH v4 06/13] modesetting: Properly clean up w/ PRIME syncing

Alex Goins agoins at nvidia.com
Fri Mar 4 02:47:51 UTC 2016


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().

v1: Initial commit
v2: Unchanged
v3: Unchanged
v4: Unchanged

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 ed67dbe..aa697f9 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -635,6 +635,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