diff options
author | Rob Clark <robdclark@gmail.com> | 2016-05-17 16:19:32 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-07-16 10:09:06 -0400 |
commit | 68209390f116034449fa6a3ae03f7b100b3d894a (patch) | |
tree | 00fae111275f1785a910792c21261b6d52876321 /drivers/gpu/drm/msm/msm_drv.h | |
parent | 4fe5f65e66823dcb212a0404af47389b2b1c58f0 (diff) | |
download | op-kernel-dev-68209390f116034449fa6a3ae03f7b100b3d894a.zip op-kernel-dev-68209390f116034449fa6a3ae03f7b100b3d894a.tar.gz |
drm/msm: shrinker support
For a first step, only purge obj->madv==DONTNEED objects. We could be
more agressive and next try unpinning inactive objects.. but that is
only useful if you have swap.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_drv.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_drv.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index a49d7fd..4755894 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -78,6 +78,8 @@ struct msm_vblank_ctrl { struct msm_drm_private { + struct drm_device *dev; + struct msm_kms *kms; /* subordinate devices, if present: */ @@ -151,6 +153,8 @@ struct msm_drm_private { struct drm_mm mm; } vram; + struct shrinker shrinker; + struct msm_vblank_ctrl vblank_ctrl; }; @@ -169,6 +173,9 @@ void msm_gem_submit_free(struct msm_gem_submit *submit); int msm_ioctl_gem_submit(struct drm_device *dev, void *data, struct drm_file *file); +void msm_gem_shrinker_init(struct drm_device *dev); +void msm_gem_shrinker_cleanup(struct drm_device *dev); + int msm_gem_mmap_obj(struct drm_gem_object *obj, struct vm_area_struct *vma); int msm_gem_mmap(struct file *filp, struct vm_area_struct *vma); @@ -196,6 +203,7 @@ void msm_gem_prime_unpin(struct drm_gem_object *obj); void *msm_gem_vaddr_locked(struct drm_gem_object *obj); void *msm_gem_vaddr(struct drm_gem_object *obj); int msm_gem_madvise(struct drm_gem_object *obj, unsigned madv); +void msm_gem_purge(struct drm_gem_object *obj); int msm_gem_sync_object(struct drm_gem_object *obj, struct msm_fence_context *fctx, bool exclusive); void msm_gem_move_to_active(struct drm_gem_object *obj, |