dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:DRM DRIVER FOR QXL VIRTUAL GPU"
	<virtualization@lists.linux-foundation.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	"open list:DRM DRIVER FOR QXL VIRTUAL GPU"
	<spice-devel@lists.freedesktop.org>,
	Dave Airlie <airlied@redhat.com>
Subject: [PATCH v5 2/6] drm/qxl: unpin release objects
Date: Wed,  3 Feb 2021 14:16:11 +0100	[thread overview]
Message-ID: <20210203131615.1714021-3-kraxel@redhat.com> (raw)
In-Reply-To: <20210203131615.1714021-1-kraxel@redhat.com>

Balances the qxl_create_bo(..., pinned=true, ...);
call in qxl_release_bo_alloc().

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/qxl/qxl_release.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c
index c52412724c26..28013fd1f8ea 100644
--- a/drivers/gpu/drm/qxl/qxl_release.c
+++ b/drivers/gpu/drm/qxl/qxl_release.c
@@ -347,6 +347,7 @@ int qxl_alloc_release_reserved(struct qxl_device *qdev, unsigned long size,
 
 	mutex_lock(&qdev->release_mutex);
 	if (qdev->current_release_bo_offset[cur_idx] + 1 >= releases_per_bo[cur_idx]) {
+		qxl_bo_unpin(qdev->current_release_bo[cur_idx]);
 		qxl_bo_unref(&qdev->current_release_bo[cur_idx]);
 		qdev->current_release_bo_offset[cur_idx] = 0;
 		qdev->current_release_bo[cur_idx] = NULL;
-- 
2.29.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2021-02-03 13:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 13:16 [PATCH v5 0/6] drm/qxl: fix driver shutdown issues Gerd Hoffmann
2021-02-03 13:16 ` [PATCH v5 1/6] drm/qxl: use drmm_mode_config_init Gerd Hoffmann
2021-02-03 13:16 ` Gerd Hoffmann [this message]
2021-02-03 14:00   ` [PATCH v5 2/6] drm/qxl: unpin release objects Thomas Zimmermann
2021-02-03 13:16 ` [PATCH v5 3/6] drm/qxl: release shadow on shutdown Gerd Hoffmann
2021-02-03 14:05   ` Thomas Zimmermann
2021-02-03 13:16 ` [PATCH v5 4/6] drm/qxl: handle shadow in primary destroy Gerd Hoffmann
2021-02-03 14:07   ` Thomas Zimmermann
2021-02-03 13:16 ` [PATCH v5 5/6] drm/qxl: properly free qxl releases Gerd Hoffmann
2021-02-03 14:12   ` Thomas Zimmermann
2021-02-03 13:16 ` [PATCH v5 6/6] drm/qxl: simplify qxl_fence_wait Gerd Hoffmann
2021-02-03 14:14   ` Thomas Zimmermann
2021-02-03 15:16   ` kernel test robot

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=20210203131615.1714021-3-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).