Lines Matching refs:ib

441 	struct amdgpu_ib *ib;  in amdgpu_vce_get_create_msg()  local
462 ib = &job->ibs[0]; in amdgpu_vce_get_create_msg()
467 ib->length_dw = 0; in amdgpu_vce_get_create_msg()
468 ib->ptr[ib->length_dw++] = 0x0000000c; /* len */ in amdgpu_vce_get_create_msg()
469 ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */ in amdgpu_vce_get_create_msg()
470 ib->ptr[ib->length_dw++] = handle; in amdgpu_vce_get_create_msg()
473 ib->ptr[ib->length_dw++] = 0x00000040; /* len */ in amdgpu_vce_get_create_msg()
475 ib->ptr[ib->length_dw++] = 0x00000030; /* len */ in amdgpu_vce_get_create_msg()
476 ib->ptr[ib->length_dw++] = 0x01000001; /* create cmd */ in amdgpu_vce_get_create_msg()
477 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
478 ib->ptr[ib->length_dw++] = 0x00000042; in amdgpu_vce_get_create_msg()
479 ib->ptr[ib->length_dw++] = 0x0000000a; in amdgpu_vce_get_create_msg()
480 ib->ptr[ib->length_dw++] = 0x00000001; in amdgpu_vce_get_create_msg()
481 ib->ptr[ib->length_dw++] = 0x00000080; in amdgpu_vce_get_create_msg()
482 ib->ptr[ib->length_dw++] = 0x00000060; in amdgpu_vce_get_create_msg()
483 ib->ptr[ib->length_dw++] = 0x00000100; in amdgpu_vce_get_create_msg()
484 ib->ptr[ib->length_dw++] = 0x00000100; in amdgpu_vce_get_create_msg()
485 ib->ptr[ib->length_dw++] = 0x0000000c; in amdgpu_vce_get_create_msg()
486 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
488 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
489 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
490 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
491 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
494 ib->ptr[ib->length_dw++] = 0x00000014; /* len */ in amdgpu_vce_get_create_msg()
495 ib->ptr[ib->length_dw++] = 0x05000005; /* feedback buffer */ in amdgpu_vce_get_create_msg()
496 ib->ptr[ib->length_dw++] = upper_32_bits(addr); in amdgpu_vce_get_create_msg()
497 ib->ptr[ib->length_dw++] = addr; in amdgpu_vce_get_create_msg()
498 ib->ptr[ib->length_dw++] = 0x00000001; in amdgpu_vce_get_create_msg()
500 for (i = ib->length_dw; i < ib_size_dw; ++i) in amdgpu_vce_get_create_msg()
501 ib->ptr[i] = 0x0; in amdgpu_vce_get_create_msg()
533 struct amdgpu_ib *ib; in amdgpu_vce_get_destroy_msg() local
545 ib = &job->ibs[0]; in amdgpu_vce_get_destroy_msg()
548 ib->length_dw = 0; in amdgpu_vce_get_destroy_msg()
549 ib->ptr[ib->length_dw++] = 0x0000000c; /* len */ in amdgpu_vce_get_destroy_msg()
550 ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */ in amdgpu_vce_get_destroy_msg()
551 ib->ptr[ib->length_dw++] = handle; in amdgpu_vce_get_destroy_msg()
553 ib->ptr[ib->length_dw++] = 0x00000020; /* len */ in amdgpu_vce_get_destroy_msg()
554 ib->ptr[ib->length_dw++] = 0x00000002; /* task info */ in amdgpu_vce_get_destroy_msg()
555 ib->ptr[ib->length_dw++] = 0xffffffff; /* next task info, set to 0xffffffff if no */ in amdgpu_vce_get_destroy_msg()
556 ib->ptr[ib->length_dw++] = 0x00000001; /* destroy session */ in amdgpu_vce_get_destroy_msg()
557 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_destroy_msg()
558 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_destroy_msg()
559ib->ptr[ib->length_dw++] = 0xffffffff; /* feedback is not needed, set to 0xffffffff and firmware w… in amdgpu_vce_get_destroy_msg()
560 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_destroy_msg()
562 ib->ptr[ib->length_dw++] = 0x00000008; /* len */ in amdgpu_vce_get_destroy_msg()
563 ib->ptr[ib->length_dw++] = 0x02000001; /* destroy cmd */ in amdgpu_vce_get_destroy_msg()
565 for (i = ib->length_dw; i < ib_size_dw; ++i) in amdgpu_vce_get_destroy_msg()
566 ib->ptr[i] = 0x0; in amdgpu_vce_get_destroy_msg()
597 struct amdgpu_ib *ib, int lo, int hi, in amdgpu_vce_validate_bo() argument
608 addr = ((uint64_t)amdgpu_ib_get_value(ib, lo)) | in amdgpu_vce_validate_bo()
609 ((uint64_t)amdgpu_ib_get_value(ib, hi)) << 32; in amdgpu_vce_validate_bo()
647 static int amdgpu_vce_cs_reloc(struct amdgpu_cs_parser *p, struct amdgpu_ib *ib, in amdgpu_vce_cs_reloc() argument
658 addr = ((uint64_t)amdgpu_ib_get_value(ib, lo)) | in amdgpu_vce_cs_reloc()
659 ((uint64_t)amdgpu_ib_get_value(ib, hi)) << 32; in amdgpu_vce_cs_reloc()
680 amdgpu_ib_set_value(ib, lo, lower_32_bits(addr)); in amdgpu_vce_cs_reloc()
681 amdgpu_ib_set_value(ib, hi, upper_32_bits(addr)); in amdgpu_vce_cs_reloc()
735 struct amdgpu_ib *ib) in amdgpu_vce_ring_parse_cs() argument
748 ib->gpu_addr = amdgpu_sa_bo_gpu_addr(ib->sa_bo); in amdgpu_vce_ring_parse_cs()
750 for (idx = 0; idx < ib->length_dw;) { in amdgpu_vce_ring_parse_cs()
751 uint32_t len = amdgpu_ib_get_value(ib, idx); in amdgpu_vce_ring_parse_cs()
752 uint32_t cmd = amdgpu_ib_get_value(ib, idx + 1); in amdgpu_vce_ring_parse_cs()
762 fb_idx = amdgpu_ib_get_value(ib, idx + 6); in amdgpu_vce_ring_parse_cs()
763 bs_idx = amdgpu_ib_get_value(ib, idx + 7); in amdgpu_vce_ring_parse_cs()
767 r = amdgpu_vce_validate_bo(p, ib, idx + 10, idx + 9, in amdgpu_vce_ring_parse_cs()
772 r = amdgpu_vce_validate_bo(p, ib, idx + 12, idx + 11, in amdgpu_vce_ring_parse_cs()
779 r = amdgpu_vce_validate_bo(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
786 tmp = amdgpu_ib_get_value(ib, idx + 4); in amdgpu_vce_ring_parse_cs()
787 r = amdgpu_vce_validate_bo(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
794 r = amdgpu_vce_validate_bo(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
801 r = amdgpu_vce_validate_bo(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
806 r = amdgpu_vce_validate_bo(p, ib, idx + 8, idx + 7, in amdgpu_vce_ring_parse_cs()
816 for (idx = 0; idx < ib->length_dw;) { in amdgpu_vce_ring_parse_cs()
817 uint32_t len = amdgpu_ib_get_value(ib, idx); in amdgpu_vce_ring_parse_cs()
818 uint32_t cmd = amdgpu_ib_get_value(ib, idx + 1); in amdgpu_vce_ring_parse_cs()
822 handle = amdgpu_ib_get_value(ib, idx + 2); in amdgpu_vce_ring_parse_cs()
833 fb_idx = amdgpu_ib_get_value(ib, idx + 6); in amdgpu_vce_ring_parse_cs()
834 bs_idx = amdgpu_ib_get_value(ib, idx + 7); in amdgpu_vce_ring_parse_cs()
849 *size = amdgpu_ib_get_value(ib, idx + 8) * in amdgpu_vce_ring_parse_cs()
850 amdgpu_ib_get_value(ib, idx + 10) * in amdgpu_vce_ring_parse_cs()
879 r = amdgpu_vce_cs_reloc(p, ib, idx + 10, idx + 9, in amdgpu_vce_ring_parse_cs()
884 r = amdgpu_vce_cs_reloc(p, ib, idx + 12, idx + 11, in amdgpu_vce_ring_parse_cs()
895 r = amdgpu_vce_cs_reloc(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
902 tmp = amdgpu_ib_get_value(ib, idx + 4); in amdgpu_vce_ring_parse_cs()
903 r = amdgpu_vce_cs_reloc(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
910 r = amdgpu_vce_cs_reloc(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
917 r = amdgpu_vce_cs_reloc(p, ib, idx + 3, in amdgpu_vce_ring_parse_cs()
922 r = amdgpu_vce_cs_reloc(p, ib, idx + 8, in amdgpu_vce_ring_parse_cs()
973 struct amdgpu_ib *ib) in amdgpu_vce_ring_parse_cs_vm() argument
982 while (idx < ib->length_dw) { in amdgpu_vce_ring_parse_cs_vm()
983 uint32_t len = amdgpu_ib_get_value(ib, idx); in amdgpu_vce_ring_parse_cs_vm()
984 uint32_t cmd = amdgpu_ib_get_value(ib, idx + 1); in amdgpu_vce_ring_parse_cs_vm()
994 handle = amdgpu_ib_get_value(ib, idx + 2); in amdgpu_vce_ring_parse_cs_vm()
1043 amdgpu_ib_free(p->adev, ib, NULL); in amdgpu_vce_ring_parse_cs_vm()
1067 struct amdgpu_ib *ib, in amdgpu_vce_ring_emit_ib() argument
1071 amdgpu_ring_write(ring, lower_32_bits(ib->gpu_addr)); in amdgpu_vce_ring_emit_ib()
1072 amdgpu_ring_write(ring, upper_32_bits(ib->gpu_addr)); in amdgpu_vce_ring_emit_ib()
1073 amdgpu_ring_write(ring, ib->length_dw); in amdgpu_vce_ring_emit_ib()