From: Roger He Date: Wed, 22 Nov 2017 07:09:33 +0000 (+0800) Subject: drm/ttm: add set_pages_wb for handling page order more than zero X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=154683dd39f0591e1c52745cba62156ab946958c;p=openwrt%2Fstaging%2Fblogic.git drm/ttm: add set_pages_wb for handling page order more than zero Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index bf25ba25bfc6..359a641d3211 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -223,6 +223,17 @@ static struct kobj_type ttm_pool_kobj_type = { static struct ttm_pool_manager *_manager; #ifndef CONFIG_X86 +static int set_pages_wb(struct page *page, int numpages) +{ +#if IS_ENABLED(CONFIG_AGP) + int i; + + for (i = 0; i < numpages; i++) + unmap_page_from_agp(page++); +#endif + return 0; +} + static int set_pages_array_wb(struct page **pages, int addrinarray) { #if IS_ENABLED(CONFIG_AGP)