]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix type mismatch and accounting in i915_gem_shrink
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 4 Oct 2013 09:33:00 +0000 (10:33 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 10 Oct 2013 10:46:48 +0000 (12:46 +0200)
commit91a1c9c59ec7f151d46f4ba8ce2e7fb3412ce764
tree13622285de53c4501af4e81709f10f692db2741c
parent3a3ad8aad18a7f30b31fa2a5e2fa6c9f2c4acede
drm/i915: Fix type mismatch and accounting in i915_gem_shrink

The interface uses an unsigned long, and we can use the unsigned counter
throughout our code, so do so. In the process, we notice one instance
where the shrink count is based on a heuristic rather than the result,
and another where we ask for too many pages to be purged.

v2: nr_to_scan needs to be promoted to a long as well, so just use
    sc->nr_to_scan directly.

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