]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
drm/panfrost: Make sure the shrinker does not reclaim referenced BOs
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 29 Nov 2019 13:59:08 +0000 (14:59 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 20 Feb 2020 14:35:33 +0000 (08:35 -0600)
commitf15671f42f35017f56c5f5e7e36ff1b2ce677935
tree60f9976ec7005535e7b980e9cf4b540f264c5c11
parent3dba65c9bbda921e3276e9ce75c8b63981f9f3a2
drm/panfrost: Make sure the shrinker does not reclaim referenced BOs

BugLink: https://bugs.launchpad.net/bugs/1864046
commit 7e0cf7e9936c4358b0863357b90aa12afe6489da upstream.

Userspace might tag a BO purgeable while it's still referenced by GPU
jobs. We need to make sure the shrinker does not purge such BOs until
all jobs referencing it are finished.

Fixes: 013b65101315 ("drm/panfrost: Add madvise and shrinker support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-9-boris.brezillon@collabora.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 279c15b917ec2dcc5128f6467304b1f253fd79a5)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/gpu/drm/panfrost/panfrost_drv.c
drivers/gpu/drm/panfrost/panfrost_gem.h
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
drivers/gpu/drm/panfrost/panfrost_job.c