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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 18 Sep 2014 14:39:59 +0000 (16:39 +0200)
commit50ac045c45d41dad0c4b38a456dcc58a64c58244
tree46a96d0b94ceb9736dbb7721f1e25d610805eb7b
parent1718e957131772d5344ee58e8c804a0641061aff
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: Jiri Slaby <jslaby@suse.cz>
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c