drm/i915: shrinker_control->nr_to_scan is now unsigned long
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 1 Oct 2015 11:18:25 +0000 (12:18 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 7 Oct 2015 14:04:04 +0000 (16:04 +0200)
As the shrinker_control now passes us unsigned long targets, update our
shrinker functions to match.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_shrinker.c

index c93f9a14eae784577d5d22459cbc49f5f91bf457..85c4894241c7a4c2634394d33f09cf69f1520ed4 100644 (file)
@@ -3203,7 +3203,7 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev,
 
 /* i915_gem_shrinker.c */
 unsigned long i915_gem_shrink(struct drm_i915_private *dev_priv,
-                             long target,
+                             unsigned long target,
                              unsigned flags);
 #define I915_SHRINK_PURGEABLE 0x1
 #define I915_SHRINK_UNBOUND 0x2
index 674341708033b0aa2900ee0776db9a78424b2028..858df2bffc9ee7d6bc0a635aa771d79d8b35c4fb 100644 (file)
@@ -73,7 +73,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
  */
 unsigned long
 i915_gem_shrink(struct drm_i915_private *dev_priv,
-               long target, unsigned flags)
+               unsigned long target, unsigned flags)
 {
        const struct {
                struct list_head *list;
@@ -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)
 {
        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);
 }