diff options
author | Rob Clark <robdclark@gmail.com> | 2016-05-17 23:19:32 +0300 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-07-16 17:09:06 +0300 |
commit | 68209390f116034449fa6a3ae03f7b100b3d894a (patch) | |
tree | 00fae111275f1785a910792c21261b6d52876321 /drivers/gpu/drm/msm/msm_drv.c | |
parent | 4fe5f65e66823dcb212a0404af47389b2b1c58f0 (diff) | |
download | linux-68209390f116034449fa6a3ae03f7b100b3d894a.tar.xz |
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.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_drv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 00881f3ed32e..f3b8f69ea9ae 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -195,6 +195,8 @@ static int msm_drm_uninit(struct device *dev) kfree(vbl_ev); } + msm_gem_shrinker_cleanup(ddev); + drm_kms_helper_poll_fini(ddev); drm_dev_unregister(ddev); @@ -350,6 +352,7 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) } ddev->dev_private = priv; + priv->dev = ddev; ret = msm_mdss_init(ddev); if (ret) { @@ -382,6 +385,8 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv) if (ret) goto fail; + msm_gem_shrinker_init(ddev); + switch (get_mdp_ver(pdev)) { case 4: kms = mdp4_kms_init(ddev); |