Lines Matching refs:r
60 int i, r; in radeon_uvd_init() local
65 r = IS_ERR(pdev); in radeon_uvd_init()
66 if (r) { in radeon_uvd_init()
107 r = request_firmware(&rdev->uvd_fw, fw_name, &pdev->dev); in radeon_uvd_init()
108 if (r) { in radeon_uvd_init()
112 return r; in radeon_uvd_init()
119 r = radeon_bo_create(rdev, bo_size, PAGE_SIZE, true, in radeon_uvd_init()
121 if (r) { in radeon_uvd_init()
122 dev_err(rdev->dev, "(%d) failed to allocate UVD bo\n", r); in radeon_uvd_init()
123 return r; in radeon_uvd_init()
126 r = radeon_uvd_resume(rdev); in radeon_uvd_init()
127 if (r) in radeon_uvd_init()
128 return r; in radeon_uvd_init()
133 r = radeon_uvd_suspend(rdev); in radeon_uvd_init()
134 if (r) in radeon_uvd_init()
135 return r; in radeon_uvd_init()
153 int r; in radeon_uvd_suspend() local
158 r = radeon_bo_reserve(rdev->uvd.vcpu_bo, false); in radeon_uvd_suspend()
159 if (!r) { in radeon_uvd_suspend()
174 return r; in radeon_uvd_suspend()
179 int r; in radeon_uvd_resume() local
184 r = radeon_bo_reserve(rdev->uvd.vcpu_bo, false); in radeon_uvd_resume()
185 if (r) { in radeon_uvd_resume()
187 dev_err(rdev->dev, "(%d) failed to reserve UVD bo\n", r); in radeon_uvd_resume()
188 return r; in radeon_uvd_resume()
195 r = radeon_bo_pin(rdev->uvd.vcpu_bo, RADEON_GEM_DOMAIN_VRAM, in radeon_uvd_resume()
197 if (r) { in radeon_uvd_resume()
200 dev_err(rdev->dev, "(%d) UVD bo pin failed\n", r); in radeon_uvd_resume()
201 return r; in radeon_uvd_resume()
204 r = radeon_bo_kmap(rdev->uvd.vcpu_bo, &rdev->uvd.cpu_addr); in radeon_uvd_resume()
205 if (r) { in radeon_uvd_resume()
206 dev_err(rdev->dev, "(%d) UVD map failed\n", r); in radeon_uvd_resume()
207 return r; in radeon_uvd_resume()
223 int i, r; in radeon_uvd_free_handles() local
229 r = radeon_uvd_get_destroy_msg(rdev, in radeon_uvd_free_handles()
231 if (r) { in radeon_uvd_free_handles()
232 DRM_ERROR("Error destroying UVD (%d)!\n", r); in radeon_uvd_free_handles()
339 int i, r; in radeon_uvd_cs_msg() local
346 r = radeon_bo_kmap(bo, &ptr); in radeon_uvd_cs_msg()
347 if (r) in radeon_uvd_cs_msg()
348 return r; in radeon_uvd_cs_msg()
362 r = radeon_uvd_cs_msg_decode(msg, buf_sizes); in radeon_uvd_cs_msg()
364 if (r) in radeon_uvd_cs_msg()
365 return r; in radeon_uvd_cs_msg()
404 int r; in radeon_uvd_cs_reloc() local
452 r = radeon_uvd_cs_msg(p, reloc->robj, offset, buf_sizes); in radeon_uvd_cs_reloc()
453 if (r) in radeon_uvd_cs_reloc()
454 return r; in radeon_uvd_cs_reloc()
465 int i, r; in radeon_uvd_cs_reg() local
477 r = radeon_uvd_cs_reloc(p, *data0, *data1, buf_sizes); in radeon_uvd_cs_reg()
478 if (r) in radeon_uvd_cs_reg()
479 return r; in radeon_uvd_cs_reg()
496 int r, data0 = 0, data1 = 0; in radeon_uvd_cs_parse() local
519 r = radeon_cs_packet_parse(p, &pkt, p->idx); in radeon_uvd_cs_parse()
520 if (r) in radeon_uvd_cs_parse()
521 return r; in radeon_uvd_cs_parse()
524 r = radeon_uvd_cs_reg(p, &pkt, &data0, in radeon_uvd_cs_parse()
526 if (r) in radeon_uvd_cs_parse()
527 return r; in radeon_uvd_cs_parse()
548 int i, r; in radeon_uvd_send_msg() local
556 r = ttm_eu_reserve_buffers(&head); in radeon_uvd_send_msg()
557 if (r) in radeon_uvd_send_msg()
558 return r; in radeon_uvd_send_msg()
563 r = ttm_bo_validate(&bo->tbo, &bo->placement, true, false); in radeon_uvd_send_msg()
564 if (r) { in radeon_uvd_send_msg()
566 return r; in radeon_uvd_send_msg()
569 r = radeon_ib_get(rdev, ring, &ib, NULL, 16); in radeon_uvd_send_msg()
570 if (r) { in radeon_uvd_send_msg()
572 return r; in radeon_uvd_send_msg()
586 r = radeon_ib_schedule(rdev, &ib, NULL); in radeon_uvd_send_msg()
587 if (r) { in radeon_uvd_send_msg()
589 return r; in radeon_uvd_send_msg()
609 int r, i; in radeon_uvd_get_create_msg() local
611 r = radeon_bo_create(rdev, 1024, PAGE_SIZE, true, in radeon_uvd_get_create_msg()
613 if (r) in radeon_uvd_get_create_msg()
614 return r; in radeon_uvd_get_create_msg()
616 r = radeon_bo_reserve(bo, false); in radeon_uvd_get_create_msg()
617 if (r) { in radeon_uvd_get_create_msg()
619 return r; in radeon_uvd_get_create_msg()
622 r = radeon_bo_kmap(bo, (void **)&msg); in radeon_uvd_get_create_msg()
623 if (r) { in radeon_uvd_get_create_msg()
626 return r; in radeon_uvd_get_create_msg()
655 int r, i; in radeon_uvd_get_destroy_msg() local
657 r = radeon_bo_create(rdev, 1024, PAGE_SIZE, true, in radeon_uvd_get_destroy_msg()
659 if (r) in radeon_uvd_get_destroy_msg()
660 return r; in radeon_uvd_get_destroy_msg()
662 r = radeon_bo_reserve(bo, false); in radeon_uvd_get_destroy_msg()
663 if (r) { in radeon_uvd_get_destroy_msg()
665 return r; in radeon_uvd_get_destroy_msg()
668 r = radeon_bo_kmap(bo, (void **)&msg); in radeon_uvd_get_destroy_msg()
669 if (r) { in radeon_uvd_get_destroy_msg()
672 return r; in radeon_uvd_get_destroy_msg()