Re: [PATCH v3 2/4] drm/qxl: unpin release objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Am 20.01.21 um 12:12 schrieb Gerd Hoffmann:
Balances the qxl_create_bo(..., pinned=true, ...);
call in qxl_release_bo_alloc().

Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
  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 0fcfc952d5e9..add979cba11b 100644
--- a/drivers/gpu/drm/qxl/qxl_release.c
+++ b/drivers/gpu/drm/qxl/qxl_release.c
@@ -166,6 +166,7 @@ qxl_release_free_list(struct qxl_release *release)
  		entry = container_of(release->,
  				     struct qxl_bo_list, tv.head);
  		bo = to_qxl_bo(entry->;
+		bo->tbo.pin_count = 0; /* ttm_bo_unpin(&bo->tbo); */

This code looks like a workaround or a bug.

AFAICT the only place with pre-pinned BO is qdev->dumb_shadow_bo. Can you remove the pinned flag entirely and handle pinning as part of dumb_shadow_bo's code.

Otherwise maybe use

if (pin_count)
WARN_ON(pin_count); /* should always be 0 now */

with a comment similar to the commit's description.

Best regards


Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Spice-devel mailing list

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]