Message ID | 20210120111240.2509679-4-kraxel@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/qxl: fix some driver shutdown issues. | expand |
Hi Am 20.01.21 um 12:12 schrieb Gerd Hoffmann: > In case we have a shadow surface on shutdown release > it so it doesn't leak. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > drivers/gpu/drm/qxl/qxl_display.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c > index 38d6b596094d..60331e31861a 100644 > --- a/drivers/gpu/drm/qxl/qxl_display.c > +++ b/drivers/gpu/drm/qxl/qxl_display.c > @@ -1229,5 +1229,9 @@ int qxl_modeset_init(struct qxl_device *qdev) > > void qxl_modeset_fini(struct qxl_device *qdev) > { > + if (qdev->dumb_shadow_bo) { Wrt to my comment on patch 2, this might be the place to unpin the BO. > + drm_gem_object_put(&qdev->dumb_shadow_bo->tbo.base); > + qdev->dumb_shadow_bo = NULL; > + } > qxl_destroy_monitors_object(qdev); > } >
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 38d6b596094d..60331e31861a 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -1229,5 +1229,9 @@ int qxl_modeset_init(struct qxl_device *qdev) void qxl_modeset_fini(struct qxl_device *qdev) { + if (qdev->dumb_shadow_bo) { + drm_gem_object_put(&qdev->dumb_shadow_bo->tbo.base); + qdev->dumb_shadow_bo = NULL; + } qxl_destroy_monitors_object(qdev); }
In case we have a shadow surface on shutdown release it so it doesn't leak. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- drivers/gpu/drm/qxl/qxl_display.c | 4 ++++ 1 file changed, 4 insertions(+)