]> 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)
commit02182f5636c4a9ea199701e348e6ff432a1be5af
tree13622285de53c4501af4e81709f10f692db2741c
parent3d49692e13a294e283174155e4c6ac1f1d2962ed
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