drm/ttm: Choose a pool to shrink correctly in ttm_dma_pool_shrink_scan().
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Sun, 3 Aug 2014 11:00:40 +0000 (20:00 +0900)
committerDave Airlie <airlied@redhat.com>
Tue, 5 Aug 2014 00:52:39 +0000 (10:52 +1000)
commit46c2df68f03a236b30808bba361f10900c88d95e
tree122f27b4a8d61c6d5d0b9aae90a11a70dc88c565
parent11e504cc705e8ccb06ac93a276e11b5e8fee4d40
drm/ttm: Choose a pool to shrink correctly in ttm_dma_pool_shrink_scan().

We can use "unsigned int" instead of "atomic_t" by updating start_pool
variable under _manager->lock. This patch will make it possible to avoid
skipping when choosing a pool to shrink in round-robin style, after next
patch changes mutex_lock(_manager->lock) to !mutex_trylock(_manager->lork).

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: stable <stable@kernel.org> [3.3+]
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c