diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2012-11-06 16:49:51 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-11-20 01:06:19 -0500 |
commit | 0b91c4a1cd7cc368763de2fe25b8ea64ea803c08 (patch) | |
tree | c8b2431490b76d516487ebd8ef83afb893ded476 /drivers/gpu/drm/ttm | |
parent | ef8cf3a1c523afa499d15856e7db3844ad59d1fb (diff) |
drm/ttm: remove ttm_buffer_object->buffer_start
All drivers set it to 0 and nothing uses it.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index e6bfcfdd3b60..f65182667825 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c | |||
@@ -1179,7 +1179,6 @@ int ttm_bo_init(struct ttm_bo_device *bdev, | |||
1179 | enum ttm_bo_type type, | 1179 | enum ttm_bo_type type, |
1180 | struct ttm_placement *placement, | 1180 | struct ttm_placement *placement, |
1181 | uint32_t page_alignment, | 1181 | uint32_t page_alignment, |
1182 | unsigned long buffer_start, | ||
1183 | bool interruptible, | 1182 | bool interruptible, |
1184 | struct file *persistent_swap_storage, | 1183 | struct file *persistent_swap_storage, |
1185 | size_t acc_size, | 1184 | size_t acc_size, |
@@ -1200,7 +1199,6 @@ int ttm_bo_init(struct ttm_bo_device *bdev, | |||
1200 | return -ENOMEM; | 1199 | return -ENOMEM; |
1201 | } | 1200 | } |
1202 | 1201 | ||
1203 | size += buffer_start & ~PAGE_MASK; | ||
1204 | num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; | 1202 | num_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; |
1205 | if (num_pages == 0) { | 1203 | if (num_pages == 0) { |
1206 | pr_err("Illegal buffer object size\n"); | 1204 | pr_err("Illegal buffer object size\n"); |
@@ -1233,7 +1231,6 @@ int ttm_bo_init(struct ttm_bo_device *bdev, | |||
1233 | bo->mem.page_alignment = page_alignment; | 1231 | bo->mem.page_alignment = page_alignment; |
1234 | bo->mem.bus.io_reserved_vm = false; | 1232 | bo->mem.bus.io_reserved_vm = false; |
1235 | bo->mem.bus.io_reserved_count = 0; | 1233 | bo->mem.bus.io_reserved_count = 0; |
1236 | bo->buffer_start = buffer_start & PAGE_MASK; | ||
1237 | bo->priv_flags = 0; | 1234 | bo->priv_flags = 0; |
1238 | bo->mem.placement = (TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED); | 1235 | bo->mem.placement = (TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED); |
1239 | bo->seq_valid = false; | 1236 | bo->seq_valid = false; |
@@ -1306,7 +1303,6 @@ int ttm_bo_create(struct ttm_bo_device *bdev, | |||
1306 | enum ttm_bo_type type, | 1303 | enum ttm_bo_type type, |
1307 | struct ttm_placement *placement, | 1304 | struct ttm_placement *placement, |
1308 | uint32_t page_alignment, | 1305 | uint32_t page_alignment, |
1309 | unsigned long buffer_start, | ||
1310 | bool interruptible, | 1306 | bool interruptible, |
1311 | struct file *persistent_swap_storage, | 1307 | struct file *persistent_swap_storage, |
1312 | struct ttm_buffer_object **p_bo) | 1308 | struct ttm_buffer_object **p_bo) |
@@ -1321,8 +1317,8 @@ int ttm_bo_create(struct ttm_bo_device *bdev, | |||
1321 | 1317 | ||
1322 | acc_size = ttm_bo_acc_size(bdev, size, sizeof(struct ttm_buffer_object)); | 1318 | acc_size = ttm_bo_acc_size(bdev, size, sizeof(struct ttm_buffer_object)); |
1323 | ret = ttm_bo_init(bdev, bo, size, type, placement, page_alignment, | 1319 | ret = ttm_bo_init(bdev, bo, size, type, placement, page_alignment, |
1324 | buffer_start, interruptible, | 1320 | interruptible, persistent_swap_storage, acc_size, |
1325 | persistent_swap_storage, acc_size, NULL, NULL); | 1321 | NULL, NULL); |
1326 | if (likely(ret == 0)) | 1322 | if (likely(ret == 0)) |
1327 | *p_bo = bo; | 1323 | *p_bo = bo; |
1328 | 1324 | ||