drm/shmem: Add madvise state and purge helpers
authorRob Herring <robh@kernel.org>
Mon, 5 Aug 2019 14:33:57 +0000 (08:33 -0600)
committerRob Herring <robh@kernel.org>
Thu, 8 Aug 2019 21:54:10 +0000 (15:54 -0600)
commit17acb9f35ed736c177f85b8ee711f278e7aff421
treed888de0d99ed6638215fec5dcc7073ca25b9ea77
parent3551a9fa2c5d3f3b0a34af67d33a0f2a5fecd94c
drm/shmem: Add madvise state and purge helpers

Add support to the shmem GEM helpers for tracking madvise state and
purging pages. This is based on the msm implementation.

The BO provides a list_head, but the list management is handled outside
of the shmem helpers as there are different locking requirements.

Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Eric Anholt <eric@anholt.net>
Acked-by: Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190805143358.21245-1-robh@kernel.org
drivers/gpu/drm/drm_gem_shmem_helper.c
include/drm/drm_gem_shmem_helper.h