[PATCH v3 5/9] modesetting: Properly clean up w/ PRIME syncing
Alex Goins
agoins at nvidia.com
Wed Feb 3 04:22:46 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
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