diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2010-11-29 13:52:18 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-01-27 16:02:31 -0500 |
commit | f9820a46dd7888b05a36e81166fb1abcc47dcc3f (patch) | |
tree | c29e32a8fe8b08bc42120ce66c6536afd5c102df /drivers/gpu/drm/ttm/ttm_page_alloc.c | |
parent | e53beacd23d9cb47590da6a7a7f6d417b941a994 (diff) |
ttm: Introduce a placeholder for DMA (bus) addresses.
This is right now limited to only non-pool constructs.
[v2: Fixed indentation issues, add review-by tag]
Reviewed-by: Thomas Hellstrom <thomas@shipmail.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_page_alloc.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_page_alloc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index b1e02fffd3cc..9d9d92945f8c 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/mm.h> | 38 | #include <linux/mm.h> |
39 | #include <linux/seq_file.h> /* for seq_printf */ | 39 | #include <linux/seq_file.h> /* for seq_printf */ |
40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
41 | #include <linux/dma-mapping.h> | ||
41 | 42 | ||
42 | #include <asm/atomic.h> | 43 | #include <asm/atomic.h> |
43 | 44 | ||
@@ -662,7 +663,8 @@ out: | |||
662 | * cached pages. | 663 | * cached pages. |
663 | */ | 664 | */ |
664 | int ttm_get_pages(struct list_head *pages, int flags, | 665 | int ttm_get_pages(struct list_head *pages, int flags, |
665 | enum ttm_caching_state cstate, unsigned count) | 666 | enum ttm_caching_state cstate, unsigned count, |
667 | dma_addr_t *dma_address) | ||
666 | { | 668 | { |
667 | struct ttm_page_pool *pool = ttm_get_pool(flags, cstate); | 669 | struct ttm_page_pool *pool = ttm_get_pool(flags, cstate); |
668 | struct page *p = NULL; | 670 | struct page *p = NULL; |
@@ -720,7 +722,7 @@ int ttm_get_pages(struct list_head *pages, int flags, | |||
720 | printk(KERN_ERR TTM_PFX | 722 | printk(KERN_ERR TTM_PFX |
721 | "Failed to allocate extra pages " | 723 | "Failed to allocate extra pages " |
722 | "for large request."); | 724 | "for large request."); |
723 | ttm_put_pages(pages, 0, flags, cstate); | 725 | ttm_put_pages(pages, 0, flags, cstate, NULL); |
724 | return r; | 726 | return r; |
725 | } | 727 | } |
726 | } | 728 | } |
@@ -731,7 +733,7 @@ int ttm_get_pages(struct list_head *pages, int flags, | |||
731 | 733 | ||
732 | /* Put all pages in pages list to correct pool to wait for reuse */ | 734 | /* Put all pages in pages list to correct pool to wait for reuse */ |
733 | void ttm_put_pages(struct list_head *pages, unsigned page_count, int flags, | 735 | void ttm_put_pages(struct list_head *pages, unsigned page_count, int flags, |
734 | enum ttm_caching_state cstate) | 736 | enum ttm_caching_state cstate, dma_addr_t *dma_address) |
735 | { | 737 | { |
736 | unsigned long irq_flags; | 738 | unsigned long irq_flags; |
737 | struct ttm_page_pool *pool = ttm_get_pool(flags, cstate); | 739 | struct ttm_page_pool *pool = ttm_get_pool(flags, cstate); |