diff options
author | Jerome Glisse <jglisse@redhat.com> | 2009-12-10 10:15:52 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-16 00:36:01 -0500 |
commit | eb6d2c39dbe46ea1c4f3da4eac5728c73f109ea1 (patch) | |
tree | 3366a54c26be5d6f35e0a2613c4d3fee039efb39 | |
parent | 9c51ba1db37cab780f38b2210913959f22d7b830 (diff) |
drm/ttm: Fix printk format & compute bo->mem.size at bo initialization
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 826240d4d675..e00ed6942067 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
@@ -80,7 +80,7 @@ static void ttm_mem_type_manager_debug(struct ttm_bo_global *glob, | |||
80 | printk(KERN_ERR TTM_PFX " gpu_offset: 0x%08lX\n", man->gpu_offset); | 80 | printk(KERN_ERR TTM_PFX " gpu_offset: 0x%08lX\n", man->gpu_offset); |
81 | printk(KERN_ERR TTM_PFX " io_offset: 0x%08lX\n", man->io_offset); | 81 | printk(KERN_ERR TTM_PFX " io_offset: 0x%08lX\n", man->io_offset); |
82 | printk(KERN_ERR TTM_PFX " io_size: %ld\n", man->io_size); | 82 | printk(KERN_ERR TTM_PFX " io_size: %ld\n", man->io_size); |
83 | printk(KERN_ERR TTM_PFX " size: %ld\n", (unsigned long)man->size); | 83 | printk(KERN_ERR TTM_PFX " size: %llu\n", man->size); |
84 | printk(KERN_ERR TTM_PFX " available_caching: 0x%08X\n", | 84 | printk(KERN_ERR TTM_PFX " available_caching: 0x%08X\n", |
85 | man->available_caching); | 85 | man->available_caching); |
86 | printk(KERN_ERR TTM_PFX " default_caching: 0x%08X\n", | 86 | printk(KERN_ERR TTM_PFX " default_caching: 0x%08X\n", |
@@ -98,7 +98,7 @@ static void ttm_bo_mem_space_debug(struct ttm_buffer_object *bo, | |||
98 | struct ttm_mem_type_manager *man; | 98 | struct ttm_mem_type_manager *man; |
99 | int i, ret, mem_type; | 99 | int i, ret, mem_type; |
100 | 100 | ||
101 | printk(KERN_ERR TTM_PFX "No space for %p (%ld pages, %ldK, %ldM)\n", | 101 | printk(KERN_ERR TTM_PFX "No space for %p (%lu pages, %luK, %luM)\n", |
102 | bo, bo->mem.num_pages, bo->mem.size >> 10, | 102 | bo, bo->mem.num_pages, bo->mem.size >> 10, |
103 | bo->mem.size >> 20); | 103 | bo->mem.size >> 20); |
104 | for (i = 0; i < placement->num_placement; i++) { | 104 | for (i = 0; i < placement->num_placement; i++) { |
@@ -1142,6 +1142,7 @@ int ttm_bo_init(struct ttm_bo_device *bdev, | |||
1142 | bo->glob = bdev->glob; | 1142 | bo->glob = bdev->glob; |
1143 | bo->type = type; | 1143 | bo->type = type; |
1144 | bo->num_pages = num_pages; | 1144 | bo->num_pages = num_pages; |
1145 | bo->mem.size = num_pages << PAGE_SHIFT; | ||
1145 | bo->mem.mem_type = TTM_PL_SYSTEM; | 1146 | bo->mem.mem_type = TTM_PL_SYSTEM; |
1146 | bo->mem.num_pages = bo->num_pages; | 1147 | bo->mem.num_pages = bo->num_pages; |
1147 | bo->mem.mm_node = NULL; | 1148 | bo->mem.mm_node = NULL; |