]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/tests: shmem: Add clean-up action to unpin pages
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 12 Dec 2025 16:00:33 +0000 (17:00 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Sun, 21 Dec 2025 17:21:34 +0000 (18:21 +0100)
commitb47b9ecef309459278eb52f02b50eefdeaac4f6d
treea838c21d40027ff2d05642c93c14dadd782f398c
parent89f23d42006630dd94c01a8c916f8c648141ad8e
drm/tests: shmem: Add clean-up action to unpin pages

Automatically unpin pages on cleanup. The test currently fails with
the error

[   58.246263] drm-kunit-mock-device drm_gem_shmem_test_get_sg_table.drm-kunit-mock-device: [drm] drm_WARN_ON(refcount_read(&shmem->pages_pin_count))

while cleaning up the GEM object. The pin count has to be zero at this
point.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: d586b535f144 ("drm/shmem-helper: Add and use pages_pin_count")
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v6.16+
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patch.msgid.link/20251212160317.287409-3-tzimmermann@suse.de
drivers/gpu/drm/tests/drm_gem_shmem_test.c