aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-02-22 13:24:32 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-02-22 13:26:23 -0500
commit5a893fc28f0393adb7c885a871b8c59e623fd528 (patch)
tree8d119f02b7d0ba7e60f0f554fa5000c2cce2fb87 /include/drm
parente0138c26cdeee8c033256ccd9e07d66db3c998be (diff)
ttm: Include the 'struct dev' when using the DMA API.
This makes the accounting when using 'debug_dma_dump_mappings()' and CONFIG_DMA_API_DEBUG=y be assigned to the correct device instead of 'fallback'. No functional change - just cosmetic. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/ttm/ttm_bo_driver.h1
-rw-r--r--include/drm/ttm/ttm_page_alloc.h8
2 files changed, 7 insertions, 2 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index ebcd3dd7203b..4d97014e8c8d 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -533,6 +533,7 @@ struct ttm_bo_device {
533 struct list_head device_list; 533 struct list_head device_list;
534 struct ttm_bo_global *glob; 534 struct ttm_bo_global *glob;
535 struct ttm_bo_driver *driver; 535 struct ttm_bo_driver *driver;
536 struct device *dev;
536 rwlock_t vm_lock; 537 rwlock_t vm_lock;
537 struct ttm_mem_type_manager man[TTM_NUM_MEM_TYPES]; 538 struct ttm_mem_type_manager man[TTM_NUM_MEM_TYPES];
538 /* 539 /*
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
index 8062890f725e..ccb6b7a240e2 100644
--- a/include/drm/ttm/ttm_page_alloc.h
+++ b/include/drm/ttm/ttm_page_alloc.h
@@ -37,12 +37,14 @@
37 * @cstate: ttm caching state for the page. 37 * @cstate: ttm caching state for the page.
38 * @count: number of pages to allocate. 38 * @count: number of pages to allocate.
39 * @dma_address: The DMA (bus) address of pages (if TTM_PAGE_FLAG_DMA32 set). 39 * @dma_address: The DMA (bus) address of pages (if TTM_PAGE_FLAG_DMA32 set).
40 * @dev: struct device for appropiate DMA accounting.
40 */ 41 */
41int ttm_get_pages(struct list_head *pages, 42int ttm_get_pages(struct list_head *pages,
42 int flags, 43 int flags,
43 enum ttm_caching_state cstate, 44 enum ttm_caching_state cstate,
44 unsigned count, 45 unsigned count,
45 dma_addr_t *dma_address); 46 dma_addr_t *dma_address,
47 struct device *dev);
46/** 48/**
47 * Put linked list of pages to pool. 49 * Put linked list of pages to pool.
48 * 50 *
@@ -52,12 +54,14 @@ int ttm_get_pages(struct list_head *pages,
52 * @flags: ttm flags for page allocation. 54 * @flags: ttm flags for page allocation.
53 * @cstate: ttm caching state. 55 * @cstate: ttm caching state.
54 * @dma_address: The DMA (bus) address of pages (if TTM_PAGE_FLAG_DMA32 set). 56 * @dma_address: The DMA (bus) address of pages (if TTM_PAGE_FLAG_DMA32 set).
57 * @dev: struct device for appropiate DMA accounting.
55 */ 58 */
56void ttm_put_pages(struct list_head *pages, 59void ttm_put_pages(struct list_head *pages,
57 unsigned page_count, 60 unsigned page_count,
58 int flags, 61 int flags,
59 enum ttm_caching_state cstate, 62 enum ttm_caching_state cstate,
60 dma_addr_t *dma_address); 63 dma_addr_t *dma_address,
64 struct device *dev);
61/** 65/**
62 * Initialize pool allocator. 66 * Initialize pool allocator.
63 */ 67 */