drm/ttm: add ttm_bo_io_mem_pfn to check io_mem_pfn
authorTan Xiaojun <tanxiaojun@huawei.com>
Mon, 25 Dec 2017 03:43:23 +0000 (11:43 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 Dec 2017 16:34:37 +0000 (11:34 -0500)
commitc67fa6edc8b11afe22c88a23963170bf5f151acf
tree852082dd9eac2f8d47380e045ea18b2aa597fc60
parent727ffdf2ac6d165f611b1accdf7f6ca770595aea
drm/ttm: add ttm_bo_io_mem_pfn to check io_mem_pfn

The io_mem_pfn field was added in commit ea642c3216cb ("drm/ttm: add
io_mem_pfn callback") and is called unconditionally. However, not all
drivers were updated to set it.

Use the ttm_bo_default_io_mem_pfn function if a driver did not set its
own. And add new function ttm_bo_io_mem_pfn() as wrapper.

Signed-off-by: Michal Srb <msrb@suse.com>
Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/ttm/ttm_bo_vm.c