Commit 14387540 authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

drm/i915: shrinker_control->nr_to_scan is now unsigned long

As the shrinker_control now passes us unsigned long targets, update our
shrinker functions to match.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 1f2449cd
...@@ -3203,7 +3203,7 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev, ...@@ -3203,7 +3203,7 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev,
/* i915_gem_shrinker.c */ /* i915_gem_shrinker.c */
unsigned long i915_gem_shrink(struct drm_i915_private *dev_priv, unsigned long i915_gem_shrink(struct drm_i915_private *dev_priv,
long target, unsigned long target,
unsigned flags); unsigned flags);
#define I915_SHRINK_PURGEABLE 0x1 #define I915_SHRINK_PURGEABLE 0x1
#define I915_SHRINK_UNBOUND 0x2 #define I915_SHRINK_UNBOUND 0x2
......
...@@ -73,7 +73,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task) ...@@ -73,7 +73,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
*/ */
unsigned long unsigned long
i915_gem_shrink(struct drm_i915_private *dev_priv, i915_gem_shrink(struct drm_i915_private *dev_priv,
long target, unsigned flags) unsigned long target, unsigned flags)
{ {
const struct { const struct {
struct list_head *list; struct list_head *list;
...@@ -159,7 +159,7 @@ i915_gem_shrink(struct drm_i915_private *dev_priv, ...@@ -159,7 +159,7 @@ i915_gem_shrink(struct drm_i915_private *dev_priv,
unsigned long i915_gem_shrink_all(struct drm_i915_private *dev_priv) unsigned long i915_gem_shrink_all(struct drm_i915_private *dev_priv)
{ {
i915_gem_evict_everything(dev_priv->dev); i915_gem_evict_everything(dev_priv->dev);
return i915_gem_shrink(dev_priv, LONG_MAX, return i915_gem_shrink(dev_priv, -1UL,
I915_SHRINK_BOUND | I915_SHRINK_UNBOUND); I915_SHRINK_BOUND | I915_SHRINK_UNBOUND);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment