diff options
| author | Alexandre Courbot <acourbot@nvidia.com> | 2014-08-04 05:28:54 -0400 |
|---|---|---|
| committer | Ben Skeggs <bskeggs@redhat.com> | 2014-08-09 11:08:03 -0400 |
| commit | 3d50d4dcb0c4e0e01f45ae15df34ab6a04fb35bb (patch) | |
| tree | e4185162685c07ad2b592cf7c6bcb882cfb660e4 /include/drm | |
| parent | 7963e9db1b1f842fdc53309baa8714d38e9f5681 (diff) | |
drm/ttm: expose CPU address of DMA-allocated pages
Pages allocated using the DMA API have a coherent memory mapping. Make
this mapping visible to drivers so they can decide to use it instead of
creating their own redundant one.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: David Airlie <airlied@linux.ie>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'include/drm')
| -rw-r--r-- | include/drm/ttm/ttm_bo_driver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 202f0a7171e8..1d9f0f1ff52d 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
| @@ -133,6 +133,7 @@ struct ttm_tt { | |||
| 133 | * struct ttm_dma_tt | 133 | * struct ttm_dma_tt |
| 134 | * | 134 | * |
| 135 | * @ttm: Base ttm_tt struct. | 135 | * @ttm: Base ttm_tt struct. |
| 136 | * @cpu_address: The CPU address of the pages | ||
| 136 | * @dma_address: The DMA (bus) addresses of the pages | 137 | * @dma_address: The DMA (bus) addresses of the pages |
| 137 | * @pages_list: used by some page allocation backend | 138 | * @pages_list: used by some page allocation backend |
| 138 | * | 139 | * |
| @@ -142,6 +143,7 @@ struct ttm_tt { | |||
| 142 | */ | 143 | */ |
| 143 | struct ttm_dma_tt { | 144 | struct ttm_dma_tt { |
| 144 | struct ttm_tt ttm; | 145 | struct ttm_tt ttm; |
| 146 | void **cpu_address; | ||
| 145 | dma_addr_t *dma_address; | 147 | dma_addr_t *dma_address; |
| 146 | struct list_head pages_list; | 148 | struct list_head pages_list; |
| 147 | }; | 149 | }; |
