From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Dave Airlie <airlied@redhat.com>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
virtualization@lists.linux-foundation.org (open list:DRM DRIVER
FOR QXL VIRTUAL GPU),
spice-devel@lists.freedesktop.org (open list:DRM DRIVER FOR QXL
VIRTUAL GPU), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v2 2/4] drm/qxl: release shadow on shutdown
Date: Tue, 29 Sep 2020 11:51:13 +0200 [thread overview]
Message-ID: <20200929095115.24430-3-kraxel@redhat.com> (raw)
In-Reply-To: <20200929095115.24430-1-kraxel@redhat.com>
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 5bef8f121e54..1d9c51022be4 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -1220,5 +1220,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);
}
--
2.27.0
next prev parent reply other threads:[~2020-09-29 9:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200929095115.24430-1-kraxel@redhat.com>
2020-09-29 9:51 ` [PATCH v2 1/4] drm/qxl: use drmm_mode_config_init Gerd Hoffmann
2020-09-29 9:51 ` Gerd Hoffmann [this message]
2020-09-29 9:51 ` [PATCH v2 3/4] drm/qxl: handle shadow in primary destroy Gerd Hoffmann
2020-09-29 9:51 ` [PATCH v2 4/4] drm/qxl: use qxl pin function Gerd Hoffmann
2020-09-29 10:53 ` Daniel Vetter
2020-09-29 11:24 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200929095115.24430-3-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=spice-devel@lists.freedesktop.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox