| Message ID | 1464868115-26264-1-git-send-email-hdegoede@redhat.com |
|---|---|
| State | Accepted |
| Commit | 210d83ad492f0e91889472eaae549106d9b4ebf5 |
| Headers | show |
| Series |
"modesetting: Set ppix->fb_id to 0 after removing the fb"
( rev:
1
)
in
X.org (DEPRECATED - USE GITLAB) |
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 4c55c4e..e8a722e 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -701,6 +701,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);
Reviewed-by: Dave Airlie <airlied@redhat.com> On 2 June 2016 at 21:48, Hans de Goede <hdegoede@redhat.com> wrote: > 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> > --- > hw/xfree86/drivers/modesetting/drmmode_display.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c > index 4c55c4e..e8a722e 100644 > --- a/hw/xfree86/drivers/modesetting/drmmode_display.c > +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c > @@ -701,6 +701,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); > -- > 2.7.4 > > _______________________________________________ > xorg-devel@lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: https://lists.x.org/mailman/listinfo/xorg-devel
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> --- hw/xfree86/drivers/modesetting/drmmode_display.c | 1 + 1 file changed, 1 insertion(+)