summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_object.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-12-03 17:46:49 +0300
committerAlex Deucher <alexander.deucher@amd.com>2014-12-04 02:26:53 +0300
commit466be3386f1c14451a9a9c0a586a9df5f06eecdf (patch)
treeb57a02538bba206f635b7143e7ddb19e73b02f8e /drivers/gpu/drm/radeon/radeon_object.c
parentaa35071c590461f95d0179cc8e730d49d610f773 (diff)
downloadlinux-466be3386f1c14451a9a9c0a586a9df5f06eecdf.tar.xz
drm/radeon: remove duplicates check
Completely unnecessary since the ww_mutex used to reserve a buffer can detect double reservations from the same thread anyway. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_object.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_object.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index a4a3ac824b45..0a8ef9ef1519 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -503,18 +503,19 @@ int radeon_bo_list_validate(struct radeon_device *rdev,
struct list_head *head, int ring)
{
struct radeon_bo_list *lobj;
- struct radeon_bo *bo;
+ struct list_head duplicates;
int r;
u64 bytes_moved = 0, initial_bytes_moved;
u64 bytes_moved_threshold = radeon_bo_get_threshold_for_moves(rdev);
- r = ttm_eu_reserve_buffers(ticket, head, true, NULL);
+ INIT_LIST_HEAD(&duplicates);
+ r = ttm_eu_reserve_buffers(ticket, head, true, &duplicates);
if (unlikely(r != 0)) {
return r;
}
list_for_each_entry(lobj, head, tv.head) {
- bo = lobj->robj;
+ struct radeon_bo *bo = lobj->robj;
if (!bo->pin_count) {
u32 domain = lobj->prefered_domains;
u32 allowed = lobj->allowed_domains;
@@ -562,6 +563,12 @@ int radeon_bo_list_validate(struct radeon_device *rdev,
lobj->gpu_offset = radeon_bo_gpu_offset(bo);
lobj->tiling_flags = bo->tiling_flags;
}
+
+ list_for_each_entry(lobj, &duplicates, tv.head) {
+ lobj->gpu_offset = radeon_bo_gpu_offset(lobj->robj);
+ lobj->tiling_flags = lobj->robj->tiling_flags;
+ }
+
return 0;
}