]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/msm: Track potentially evictable objects
authorRob Clark <robdclark@chromium.org>
Mon, 5 Apr 2021 17:45:29 +0000 (10:45 -0700)
committerRob Clark <robdclark@chromium.org>
Wed, 7 Apr 2021 18:05:47 +0000 (11:05 -0700)
commit64fcbde772c72af81e96189d748a4bc8950b08d3
tree187b7eca148b40daa4d8959c930ccd31b8c89f73
parentf48f356330f7124671b28ddc93a28c492ef05b9f
drm/msm: Track potentially evictable objects

Objects that are potential for swapping out are (1) willneed (ie. if
they are purgable/MADV_WONTNEED we can just free the pages without them
having to land in swap), (2) not on an active list, (3) not dma-buf
imported or exported, and (4) not vmap'd.  This repurposes the purged
list for objects that do not have backing pages (either because they
have not been pinned for the first time yet, or in a later patch because
they have been unpinned/evicted.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20210405174532.1441497-7-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_drv.h
drivers/gpu/drm/msm/msm_gem.c
drivers/gpu/drm/msm/msm_gem.h