Lines Matching refs:r
41 int r, ring; in radeon_do_test_moves() local
72 r = 1; in radeon_do_test_moves()
76 r = radeon_bo_create(rdev, size, PAGE_SIZE, true, RADEON_GEM_DOMAIN_VRAM, in radeon_do_test_moves()
78 if (r) { in radeon_do_test_moves()
82 r = radeon_bo_reserve(vram_obj, false); in radeon_do_test_moves()
83 if (unlikely(r != 0)) in radeon_do_test_moves()
85 r = radeon_bo_pin(vram_obj, RADEON_GEM_DOMAIN_VRAM, &vram_addr); in radeon_do_test_moves()
86 if (r) { in radeon_do_test_moves()
95 r = radeon_bo_create(rdev, size, PAGE_SIZE, true, in radeon_do_test_moves()
97 if (r) { in radeon_do_test_moves()
102 r = radeon_bo_reserve(gtt_obj[i], false); in radeon_do_test_moves()
103 if (unlikely(r != 0)) in radeon_do_test_moves()
105 r = radeon_bo_pin(gtt_obj[i], RADEON_GEM_DOMAIN_GTT, >t_addr); in radeon_do_test_moves()
106 if (r) { in radeon_do_test_moves()
111 r = radeon_bo_kmap(gtt_obj[i], >t_map); in radeon_do_test_moves()
112 if (r) { in radeon_do_test_moves()
125 r = radeon_copy_dma(rdev, gtt_addr, vram_addr, size / RADEON_GPU_PAGE_SIZE, &fence); in radeon_do_test_moves()
127 r = radeon_copy_blit(rdev, gtt_addr, vram_addr, size / RADEON_GPU_PAGE_SIZE, &fence); in radeon_do_test_moves()
128 if (r) { in radeon_do_test_moves()
133 r = radeon_fence_wait(fence, false); in radeon_do_test_moves()
134 if (r) { in radeon_do_test_moves()
141 r = radeon_bo_kmap(vram_obj, &vram_map); in radeon_do_test_moves()
142 if (r) { in radeon_do_test_moves()
171 r = radeon_copy_dma(rdev, vram_addr, gtt_addr, size / RADEON_GPU_PAGE_SIZE, &fence); in radeon_do_test_moves()
173 r = radeon_copy_blit(rdev, vram_addr, gtt_addr, size / RADEON_GPU_PAGE_SIZE, &fence); in radeon_do_test_moves()
174 if (r) { in radeon_do_test_moves()
179 r = radeon_fence_wait(fence, false); in radeon_do_test_moves()
180 if (r) { in radeon_do_test_moves()
187 r = radeon_bo_kmap(gtt_obj[i], >t_map); in radeon_do_test_moves()
188 if (r) { in radeon_do_test_moves()
242 if (r) { in radeon_do_test_moves()
259 int r; in radeon_test_create_and_emit_fence() local
262 r = radeon_uvd_get_create_msg(rdev, ring->idx, 1, NULL); in radeon_test_create_and_emit_fence()
263 if (r) { in radeon_test_create_and_emit_fence()
265 return r; in radeon_test_create_and_emit_fence()
268 r = radeon_uvd_get_destroy_msg(rdev, ring->idx, 1, fence); in radeon_test_create_and_emit_fence()
269 if (r) { in radeon_test_create_and_emit_fence()
271 return r; in radeon_test_create_and_emit_fence()
274 r = radeon_ring_lock(rdev, ring, 64); in radeon_test_create_and_emit_fence()
275 if (r) { in radeon_test_create_and_emit_fence()
277 return r; in radeon_test_create_and_emit_fence()
291 int r; in radeon_test_ring_sync() local
293 r = radeon_semaphore_create(rdev, &semaphore); in radeon_test_ring_sync()
294 if (r) { in radeon_test_ring_sync()
299 r = radeon_ring_lock(rdev, ringA, 64); in radeon_test_ring_sync()
300 if (r) { in radeon_test_ring_sync()
307 r = radeon_test_create_and_emit_fence(rdev, ringA, &fence1); in radeon_test_ring_sync()
308 if (r) in radeon_test_ring_sync()
311 r = radeon_ring_lock(rdev, ringA, 64); in radeon_test_ring_sync()
312 if (r) { in radeon_test_ring_sync()
319 r = radeon_test_create_and_emit_fence(rdev, ringA, &fence2); in radeon_test_ring_sync()
320 if (r) in radeon_test_ring_sync()
330 r = radeon_ring_lock(rdev, ringB, 64); in radeon_test_ring_sync()
331 if (r) { in radeon_test_ring_sync()
338 r = radeon_fence_wait(fence1, false); in radeon_test_ring_sync()
339 if (r) { in radeon_test_ring_sync()
351 r = radeon_ring_lock(rdev, ringB, 64); in radeon_test_ring_sync()
352 if (r) { in radeon_test_ring_sync()
359 r = radeon_fence_wait(fence2, false); in radeon_test_ring_sync()
360 if (r) { in radeon_test_ring_sync()
374 if (r) in radeon_test_ring_sync()
375 printk(KERN_WARNING "Error while testing ring sync (%d).\n", r); in radeon_test_ring_sync()
386 int i, r; in radeon_test_ring_sync2() local
388 r = radeon_semaphore_create(rdev, &semaphore); in radeon_test_ring_sync2()
389 if (r) { in radeon_test_ring_sync2()
394 r = radeon_ring_lock(rdev, ringA, 64); in radeon_test_ring_sync2()
395 if (r) { in radeon_test_ring_sync2()
402 r = radeon_test_create_and_emit_fence(rdev, ringA, &fenceA); in radeon_test_ring_sync2()
403 if (r) in radeon_test_ring_sync2()
406 r = radeon_ring_lock(rdev, ringB, 64); in radeon_test_ring_sync2()
407 if (r) { in radeon_test_ring_sync2()
413 r = radeon_test_create_and_emit_fence(rdev, ringB, &fenceB); in radeon_test_ring_sync2()
414 if (r) in radeon_test_ring_sync2()
428 r = radeon_ring_lock(rdev, ringC, 64); in radeon_test_ring_sync2()
429 if (r) { in radeon_test_ring_sync2()
454 r = radeon_ring_lock(rdev, ringC, 64); in radeon_test_ring_sync2()
455 if (r) { in radeon_test_ring_sync2()
464 r = radeon_fence_wait(fenceA, false); in radeon_test_ring_sync2()
465 if (r) { in radeon_test_ring_sync2()
469 r = radeon_fence_wait(fenceB, false); in radeon_test_ring_sync2()
470 if (r) { in radeon_test_ring_sync2()
484 if (r) in radeon_test_ring_sync2()
485 printk(KERN_WARNING "Error while testing ring sync (%d).\n", r); in radeon_test_ring_sync2()