Lines Matching refs:ib
372 struct amdgpu_ib *ib = NULL; in amdgpu_vce_get_create_msg() local
378 ib = kzalloc(sizeof(struct amdgpu_ib), GFP_KERNEL); in amdgpu_vce_get_create_msg()
379 if (!ib) in amdgpu_vce_get_create_msg()
381 r = amdgpu_ib_get(ring, NULL, ib_size_dw * 4, ib); in amdgpu_vce_get_create_msg()
384 kfree(ib); in amdgpu_vce_get_create_msg()
388 dummy = ib->gpu_addr + 1024; in amdgpu_vce_get_create_msg()
391 ib->length_dw = 0; in amdgpu_vce_get_create_msg()
392 ib->ptr[ib->length_dw++] = 0x0000000c; /* len */ in amdgpu_vce_get_create_msg()
393 ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */ in amdgpu_vce_get_create_msg()
394 ib->ptr[ib->length_dw++] = handle; in amdgpu_vce_get_create_msg()
397 ib->ptr[ib->length_dw++] = 0x00000040; /* len */ in amdgpu_vce_get_create_msg()
399 ib->ptr[ib->length_dw++] = 0x00000030; /* len */ in amdgpu_vce_get_create_msg()
400 ib->ptr[ib->length_dw++] = 0x01000001; /* create cmd */ in amdgpu_vce_get_create_msg()
401 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
402 ib->ptr[ib->length_dw++] = 0x00000042; in amdgpu_vce_get_create_msg()
403 ib->ptr[ib->length_dw++] = 0x0000000a; in amdgpu_vce_get_create_msg()
404 ib->ptr[ib->length_dw++] = 0x00000001; in amdgpu_vce_get_create_msg()
405 ib->ptr[ib->length_dw++] = 0x00000080; in amdgpu_vce_get_create_msg()
406 ib->ptr[ib->length_dw++] = 0x00000060; in amdgpu_vce_get_create_msg()
407 ib->ptr[ib->length_dw++] = 0x00000100; in amdgpu_vce_get_create_msg()
408 ib->ptr[ib->length_dw++] = 0x00000100; in amdgpu_vce_get_create_msg()
409 ib->ptr[ib->length_dw++] = 0x0000000c; in amdgpu_vce_get_create_msg()
410 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
412 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
413 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
414 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
415 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
418 ib->ptr[ib->length_dw++] = 0x00000014; /* len */ in amdgpu_vce_get_create_msg()
419 ib->ptr[ib->length_dw++] = 0x05000005; /* feedback buffer */ in amdgpu_vce_get_create_msg()
420 ib->ptr[ib->length_dw++] = upper_32_bits(dummy); in amdgpu_vce_get_create_msg()
421 ib->ptr[ib->length_dw++] = dummy; in amdgpu_vce_get_create_msg()
422 ib->ptr[ib->length_dw++] = 0x00000001; in amdgpu_vce_get_create_msg()
424 for (i = ib->length_dw; i < ib_size_dw; ++i) in amdgpu_vce_get_create_msg()
425 ib->ptr[i] = 0x0; in amdgpu_vce_get_create_msg()
427 r = amdgpu_sched_ib_submit_kernel_helper(adev, ring, ib, 1, in amdgpu_vce_get_create_msg()
439 amdgpu_ib_free(adev, ib); in amdgpu_vce_get_create_msg()
440 kfree(ib); in amdgpu_vce_get_create_msg()
458 struct amdgpu_ib *ib = NULL; in amdgpu_vce_get_destroy_msg() local
464 ib = kzalloc(sizeof(struct amdgpu_ib), GFP_KERNEL); in amdgpu_vce_get_destroy_msg()
465 if (!ib) in amdgpu_vce_get_destroy_msg()
468 r = amdgpu_ib_get(ring, NULL, ib_size_dw * 4, ib); in amdgpu_vce_get_destroy_msg()
470 kfree(ib); in amdgpu_vce_get_destroy_msg()
475 dummy = ib->gpu_addr + 1024; in amdgpu_vce_get_destroy_msg()
478 ib->length_dw = 0; in amdgpu_vce_get_destroy_msg()
479 ib->ptr[ib->length_dw++] = 0x0000000c; /* len */ in amdgpu_vce_get_destroy_msg()
480 ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */ in amdgpu_vce_get_destroy_msg()
481 ib->ptr[ib->length_dw++] = handle; in amdgpu_vce_get_destroy_msg()
483 ib->ptr[ib->length_dw++] = 0x00000014; /* len */ in amdgpu_vce_get_destroy_msg()
484 ib->ptr[ib->length_dw++] = 0x05000005; /* feedback buffer */ in amdgpu_vce_get_destroy_msg()
485 ib->ptr[ib->length_dw++] = upper_32_bits(dummy); in amdgpu_vce_get_destroy_msg()
486 ib->ptr[ib->length_dw++] = dummy; in amdgpu_vce_get_destroy_msg()
487 ib->ptr[ib->length_dw++] = 0x00000001; in amdgpu_vce_get_destroy_msg()
489 ib->ptr[ib->length_dw++] = 0x00000008; /* len */ in amdgpu_vce_get_destroy_msg()
490 ib->ptr[ib->length_dw++] = 0x02000001; /* destroy cmd */ in amdgpu_vce_get_destroy_msg()
492 for (i = ib->length_dw; i < ib_size_dw; ++i) in amdgpu_vce_get_destroy_msg()
493 ib->ptr[i] = 0x0; in amdgpu_vce_get_destroy_msg()
494 r = amdgpu_sched_ib_submit_kernel_helper(adev, ring, ib, 1, in amdgpu_vce_get_destroy_msg()
506 amdgpu_ib_free(adev, ib); in amdgpu_vce_get_destroy_msg()
507 kfree(ib); in amdgpu_vce_get_destroy_msg()
525 struct amdgpu_ib *ib = &p->ibs[ib_idx]; in amdgpu_vce_cs_reloc() local
554 ib->ptr[lo] = addr & 0xFFFFFFFF; in amdgpu_vce_cs_reloc()
555 ib->ptr[hi] = addr >> 32; in amdgpu_vce_cs_reloc()
610 struct amdgpu_ib *ib = &p->ibs[ib_idx]; in amdgpu_vce_ring_parse_cs() local
622 while (idx < ib->length_dw) { in amdgpu_vce_ring_parse_cs()
777 void amdgpu_vce_ring_emit_ib(struct amdgpu_ring *ring, struct amdgpu_ib *ib) in amdgpu_vce_ring_emit_ib() argument
780 amdgpu_ring_write(ring, lower_32_bits(ib->gpu_addr)); in amdgpu_vce_ring_emit_ib()
781 amdgpu_ring_write(ring, upper_32_bits(ib->gpu_addr)); in amdgpu_vce_ring_emit_ib()
782 amdgpu_ring_write(ring, ib->length_dw); in amdgpu_vce_ring_emit_ib()