drm/ttm: add VADDR_FLAG_UPDATED_COUNT to correctly update dma_page global count
authorRoger He <Hongbo.He@amd.com>
Mon, 15 Jan 2018 05:06:38 +0000 (13:06 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Jan 2018 21:07:26 +0000 (16:07 -0500)
commit8f2112f84c3c2acd3fcc8b922e78b6758db902db
tree1f5e88f225fa4ae80d976d87333ef881bdba74cc
parent8159e509203c50d0684483b4311b20e5d40553e8
drm/ttm: add VADDR_FLAG_UPDATED_COUNT to correctly update dma_page global count

add this for correctly updating global mem count in ttm_mem_zone.
before that when ttm_mem_global_alloc_page fails, we would update all
dma_page's global mem count in ttm_dma->pages_list. but actually here
we should not update for the last dma_page.

v2: only the update of last dma_page is not right
v3: use lower bits of dma_page vaddr

Signed-off-by: Roger He <Hongbo.He@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c