]> git.baikalelectronics.ru Git - kernel.git/commit
drm/etnaviv: reap idle softpin mappings when necessary
authorLucas Stach <l.stach@pengutronix.de>
Wed, 23 Mar 2022 16:08:25 +0000 (17:08 +0100)
committerLucas Stach <l.stach@pengutronix.de>
Wed, 6 Apr 2022 08:01:51 +0000 (10:01 +0200)
commit0eb6c87601d2abc487406f2be623b4cc4cb8fc35
tree1514e271a5f0700ad465f2b69027c11ef18cc319
parentad7a4cb85680e27991ea2ae6d881c3d618f7cf38
drm/etnaviv: reap idle softpin mappings when necessary

Right now the only point where softpin mappings get removed from the
MMU context is when the mapped GEM object is destroyed. However,
userspace might want to reuse that address space before the object
is destroyed, which is a valid usage, as long as all mapping in that
region of the address space are no longer used by any GPU jobs.

Implement reaping of idle MMU mappings that would otherwise
prevent the insertion of a softpin mapping.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Guido Günther <agx@sigxcpu.org>
Acked-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
drivers/gpu/drm/etnaviv/etnaviv_mmu.c