aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_memory.c
diff options
context:
space:
mode:
authorRoger He <Hongbo.He@amd.com>2017-12-08 02:21:18 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-12-27 11:38:55 -0500
commit9de2fb99ebe059f7777b4c0463eca2946f2bda4d (patch)
tree9d620a073b86db04996eeabb38095464cccd0242 /drivers/gpu/drm/ttm/ttm_memory.c
parent279c01f6ef626d59b93383d183fb69173d3f7ac7 (diff)
drm/ttm: use an operation ctx for ttm_mem_global_alloc_page
forward the operation context to ttm_mem_global_alloc_page as well, and the ultimate goal is swapout enablement for reserved BOs. Here reserved BOs refer to all the BOs which share same reservation object 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_memory.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_memory.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c
index 525d3b601790..102b326d3c42 100644
--- a/drivers/gpu/drm/ttm/ttm_memory.c
+++ b/drivers/gpu/drm/ttm/ttm_memory.c
@@ -539,14 +539,10 @@ int ttm_mem_global_alloc(struct ttm_mem_global *glob, uint64_t memory,
539EXPORT_SYMBOL(ttm_mem_global_alloc); 539EXPORT_SYMBOL(ttm_mem_global_alloc);
540 540
541int ttm_mem_global_alloc_page(struct ttm_mem_global *glob, 541int ttm_mem_global_alloc_page(struct ttm_mem_global *glob,
542 struct page *page, uint64_t size) 542 struct page *page, uint64_t size,
543 struct ttm_operation_ctx *ctx)
543{ 544{
544
545 struct ttm_mem_zone *zone = NULL; 545 struct ttm_mem_zone *zone = NULL;
546 struct ttm_operation_ctx ctx = {
547 .interruptible = false,
548 .no_wait_gpu = false
549 };
550 546
551 /** 547 /**
552 * Page allocations may be registed in a single zone 548 * Page allocations may be registed in a single zone
@@ -560,7 +556,7 @@ int ttm_mem_global_alloc_page(struct ttm_mem_global *glob,
560 if (glob->zone_dma32 && page_to_pfn(page) > 0x00100000UL) 556 if (glob->zone_dma32 && page_to_pfn(page) > 0x00100000UL)
561 zone = glob->zone_kernel; 557 zone = glob->zone_kernel;
562#endif 558#endif
563 return ttm_mem_global_alloc_zone(glob, zone, size, &ctx); 559 return ttm_mem_global_alloc_zone(glob, zone, size, ctx);
564} 560}
565 561
566void ttm_mem_global_free_page(struct ttm_mem_global *glob, struct page *page, 562void ttm_mem_global_free_page(struct ttm_mem_global *glob, struct page *page,