diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2021-02-04 15:57:09 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-02-05 08:52:45 +0100 |
commit | 5f6c871fe919999774e8535ea611a6f84ee43ee4 (patch) | |
tree | bc1f8db06144ff7660b81ead867b4163894eb40c /drivers/gpu/drm/qxl/qxl_release.c | |
parent | drm/qxl: handle shadow in primary destroy (diff) | |
download | linux-5f6c871fe919999774e8535ea611a6f84ee43ee4.tar.xz linux-5f6c871fe919999774e8535ea611a6f84ee43ee4.zip |
drm/qxl: properly free qxl releases
Reorganize qxl_device_fini() a bit.
Add missing unpin() calls.
Count releases. Add wait queue for releases. That way
qxl_device_fini() can easily wait until everything is
ready for proper shutdown.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-9-kraxel@redhat.com
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_release.c')
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_release.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c index 28013fd1f8ea..43a5436853b7 100644 --- a/drivers/gpu/drm/qxl/qxl_release.c +++ b/drivers/gpu/drm/qxl/qxl_release.c @@ -196,6 +196,7 @@ qxl_release_free(struct qxl_device *qdev, qxl_release_free_list(release); kfree(release); } + atomic_dec(&qdev->release_count); } static int qxl_release_bo_alloc(struct qxl_device *qdev, @@ -344,6 +345,7 @@ int qxl_alloc_release_reserved(struct qxl_device *qdev, unsigned long size, *rbo = NULL; return idr_ret; } + atomic_inc(&qdev->release_count); mutex_lock(&qdev->release_mutex); if (qdev->current_release_bo_offset[cur_idx] + 1 >= releases_per_bo[cur_idx]) { |