aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/ttm/ttm_bo_api.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-09-24 16:22:33 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-24 16:22:33 -0400
commitbaea7b946f00a291b166ccae7fcfed6c01530cc6 (patch)
tree4aa275fbdbec9c7b9b4629e8bee2bbecd3c6a6af /include/drm/ttm/ttm_bo_api.h
parentae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (diff)
parent94e0fb086fc5663c38bbc0fe86d698be8314f82f (diff)
Merge branch 'origin' into for-linus
Conflicts: MAINTAINERS
Diffstat (limited to 'include/drm/ttm/ttm_bo_api.h')
-rw-r--r--include/drm/ttm/ttm_bo_api.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
index cd22ab4b495c..491146170522 100644
--- a/include/drm/ttm/ttm_bo_api.h
+++ b/include/drm/ttm/ttm_bo_api.h
@@ -155,6 +155,7 @@ struct ttm_buffer_object {
155 * Members constant at init. 155 * Members constant at init.
156 */ 156 */
157 157
158 struct ttm_bo_global *glob;
158 struct ttm_bo_device *bdev; 159 struct ttm_bo_device *bdev;
159 unsigned long buffer_start; 160 unsigned long buffer_start;
160 enum ttm_bo_type type; 161 enum ttm_bo_type type;
@@ -245,14 +246,15 @@ struct ttm_buffer_object {
245 * premapped region. 246 * premapped region.
246 */ 247 */
247 248
249#define TTM_BO_MAP_IOMEM_MASK 0x80
248struct ttm_bo_kmap_obj { 250struct ttm_bo_kmap_obj {
249 void *virtual; 251 void *virtual;
250 struct page *page; 252 struct page *page;
251 enum { 253 enum {
252 ttm_bo_map_iomap, 254 ttm_bo_map_iomap = 1 | TTM_BO_MAP_IOMEM_MASK,
253 ttm_bo_map_vmap, 255 ttm_bo_map_vmap = 2,
254 ttm_bo_map_kmap, 256 ttm_bo_map_kmap = 3,
255 ttm_bo_map_premapped, 257 ttm_bo_map_premapped = 4 | TTM_BO_MAP_IOMEM_MASK,
256 } bo_kmap_type; 258 } bo_kmap_type;
257}; 259};
258 260
@@ -522,8 +524,7 @@ extern int ttm_bo_evict_mm(struct ttm_bo_device *bdev, unsigned mem_type);
522static inline void *ttm_kmap_obj_virtual(struct ttm_bo_kmap_obj *map, 524static inline void *ttm_kmap_obj_virtual(struct ttm_bo_kmap_obj *map,
523 bool *is_iomem) 525 bool *is_iomem)
524{ 526{
525 *is_iomem = (map->bo_kmap_type == ttm_bo_map_iomap || 527 *is_iomem = !!(map->bo_kmap_type & TTM_BO_MAP_IOMEM_MASK);
526 map->bo_kmap_type == ttm_bo_map_premapped);
527 return map->virtual; 528 return map->virtual;
528} 529}
529 530