summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_page_alloc.c
diff options
context:
space:
mode:
authorRoger He <Hongbo.He@amd.com>2017-11-22 08:09:33 +0100
committerAlex Deucher <alexander.deucher@amd.com>2017-12-06 18:48:14 +0100
commit154683dd39f0591e1c52745cba62156ab946958c (patch)
tree0f46cdb362ad7909a743e9f36857768ba35ec70f /drivers/gpu/drm/ttm/ttm_page_alloc.c
parentdrm/amd/display: dal 3.1.20 (diff)
downloadlinux-154683dd39f0591e1c52745cba62156ab946958c.tar.xz
linux-154683dd39f0591e1c52745cba62156ab946958c.zip
drm/ttm: add set_pages_wb for handling page order more than zero
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Roger He <Hongbo.He@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_page_alloc.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_page_alloc.c11
1 files changed, 11 insertions, 0 deletions
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)