drm/ttm: add new function to check if bo is allowable to evict or swapout
authorRoger He <Hongbo.He@amd.com>
Thu, 21 Dec 2017 09:42:52 +0000 (17:42 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Dec 2017 14:48:20 +0000 (09:48 -0500)
commitd5769ba315d8ffcf6eeb90b6d7c99d3143547ddb
treea5c2b53415d9f7369bcf10bb689292a91d95c58c
parent993baf15560d2e8153f715cec677e6576b35662e
drm/ttm: add new function to check if bo is allowable to evict or swapout

extract a function as ttm_bo_evict_swapout_allowable since eviction and
swapout can share same logic.

v2: modify commit message and add description in the code

Reviewed-by: Thomas Hellström <thellstrom@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chuming Zhou <david1.zhou@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/ttm/ttm_bo.c