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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:54:07 +0000 (14:54 -0700)
commita0fe26d09596ccb84f68603f02c4c78a6394e9f9
tree9c9046160a63a4abfe6087131308e6e7f0d8791a
parent0f90c9c088df9196dbb322175413a79f41f9975f
drm/ttm: Choose a pool to shrink correctly in ttm_dma_pool_shrink_scan().

commit 46c2df68f03a236b30808bba361f10900c88d95e upstream.

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>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c