summaryrefslogtreecommitdiff
path: root/hw/xfree86/drivers
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-06-01 15:07:22 +0200
committerHans de Goede <hdegoede@redhat.com>2016-06-17 11:38:13 +0200
commit210d83ad492f0e91889472eaae549106d9b4ebf5 (patch)
tree90a6da4a1d7e5ddf46b0e457a32a08da1dc2d28a /hw/xfree86/drivers
parentb8ef71fb07a8ba9587aeaca942b4de20b59266ca (diff)
modesetting: Set ppix->fb_id to 0 after removing the fb
This ensures the fb gets re-added when a shared pixmap is re-used for a second drmmode_set_scanout_pixmap_cpu call. Note currently the xserver never re-uses a shared pixmap in this way, so this is mostly a sanity fix. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'hw/xfree86/drivers')
-rw-r--r--hw/xfree86/drivers/modesetting/drmmode_display.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 04d9df325..e6bc80d24 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -693,6 +693,7 @@ 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);
+ ppriv->fb_id = 0;
}
if (drmmode_crtc->slave_damage) {
DamageUnregister(drmmode_crtc->slave_damage);