Lines Matching refs:ib

447 	struct amdgpu_ib *ib;  in amdgpu_vce_get_create_msg()  local
466 ib = &job->ibs[0]; in amdgpu_vce_get_create_msg()
471 ib->length_dw = 0; in amdgpu_vce_get_create_msg()
472 ib->ptr[ib->length_dw++] = 0x0000000c; /* len */ in amdgpu_vce_get_create_msg()
473 ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */ in amdgpu_vce_get_create_msg()
474 ib->ptr[ib->length_dw++] = handle; in amdgpu_vce_get_create_msg()
477 ib->ptr[ib->length_dw++] = 0x00000040; /* len */ in amdgpu_vce_get_create_msg()
479 ib->ptr[ib->length_dw++] = 0x00000030; /* len */ in amdgpu_vce_get_create_msg()
480 ib->ptr[ib->length_dw++] = 0x01000001; /* create cmd */ in amdgpu_vce_get_create_msg()
481 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
482 ib->ptr[ib->length_dw++] = 0x00000042; in amdgpu_vce_get_create_msg()
483 ib->ptr[ib->length_dw++] = 0x0000000a; in amdgpu_vce_get_create_msg()
484 ib->ptr[ib->length_dw++] = 0x00000001; in amdgpu_vce_get_create_msg()
485 ib->ptr[ib->length_dw++] = 0x00000080; in amdgpu_vce_get_create_msg()
486 ib->ptr[ib->length_dw++] = 0x00000060; in amdgpu_vce_get_create_msg()
487 ib->ptr[ib->length_dw++] = 0x00000100; in amdgpu_vce_get_create_msg()
488 ib->ptr[ib->length_dw++] = 0x00000100; in amdgpu_vce_get_create_msg()
489 ib->ptr[ib->length_dw++] = 0x0000000c; in amdgpu_vce_get_create_msg()
490 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
492 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
493 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
494 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
495 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_create_msg()
498 ib->ptr[ib->length_dw++] = 0x00000014; /* len */ in amdgpu_vce_get_create_msg()
499 ib->ptr[ib->length_dw++] = 0x05000005; /* feedback buffer */ in amdgpu_vce_get_create_msg()
500 ib->ptr[ib->length_dw++] = upper_32_bits(addr); in amdgpu_vce_get_create_msg()
501 ib->ptr[ib->length_dw++] = addr; in amdgpu_vce_get_create_msg()
502 ib->ptr[ib->length_dw++] = 0x00000001; in amdgpu_vce_get_create_msg()
504 for (i = ib->length_dw; i < ib_size_dw; ++i) in amdgpu_vce_get_create_msg()
505 ib->ptr[i] = 0x0; in amdgpu_vce_get_create_msg()
537 struct amdgpu_ib *ib; in amdgpu_vce_get_destroy_msg() local
547 ib = &job->ibs[0]; in amdgpu_vce_get_destroy_msg()
550 ib->length_dw = 0; in amdgpu_vce_get_destroy_msg()
551 ib->ptr[ib->length_dw++] = 0x0000000c; /* len */ in amdgpu_vce_get_destroy_msg()
552 ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */ in amdgpu_vce_get_destroy_msg()
553 ib->ptr[ib->length_dw++] = handle; in amdgpu_vce_get_destroy_msg()
555 ib->ptr[ib->length_dw++] = 0x00000020; /* len */ in amdgpu_vce_get_destroy_msg()
556 ib->ptr[ib->length_dw++] = 0x00000002; /* task info */ in amdgpu_vce_get_destroy_msg()
557 ib->ptr[ib->length_dw++] = 0xffffffff; /* next task info, set to 0xffffffff if no */ in amdgpu_vce_get_destroy_msg()
558 ib->ptr[ib->length_dw++] = 0x00000001; /* destroy session */ in amdgpu_vce_get_destroy_msg()
559 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_destroy_msg()
560 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_destroy_msg()
561ib->ptr[ib->length_dw++] = 0xffffffff; /* feedback is not needed, set to 0xffffffff and firmware w… in amdgpu_vce_get_destroy_msg()
562 ib->ptr[ib->length_dw++] = 0x00000000; in amdgpu_vce_get_destroy_msg()
564 ib->ptr[ib->length_dw++] = 0x00000008; /* len */ in amdgpu_vce_get_destroy_msg()
565 ib->ptr[ib->length_dw++] = 0x02000001; /* destroy cmd */ in amdgpu_vce_get_destroy_msg()
567 for (i = ib->length_dw; i < ib_size_dw; ++i) in amdgpu_vce_get_destroy_msg()
568 ib->ptr[i] = 0x0; in amdgpu_vce_get_destroy_msg()
600 struct amdgpu_ib *ib, int lo, int hi, in amdgpu_vce_validate_bo() argument
611 addr = ((uint64_t)amdgpu_ib_get_value(ib, lo)) | in amdgpu_vce_validate_bo()
612 ((uint64_t)amdgpu_ib_get_value(ib, hi)) << 32; in amdgpu_vce_validate_bo()
650 static int amdgpu_vce_cs_reloc(struct amdgpu_cs_parser *p, struct amdgpu_ib *ib, in amdgpu_vce_cs_reloc() argument
661 addr = ((uint64_t)amdgpu_ib_get_value(ib, lo)) | in amdgpu_vce_cs_reloc()
662 ((uint64_t)amdgpu_ib_get_value(ib, hi)) << 32; in amdgpu_vce_cs_reloc()
683 amdgpu_ib_set_value(ib, lo, lower_32_bits(addr)); in amdgpu_vce_cs_reloc()
684 amdgpu_ib_set_value(ib, hi, upper_32_bits(addr)); in amdgpu_vce_cs_reloc()
738 struct amdgpu_ib *ib) in amdgpu_vce_ring_parse_cs() argument
751 ib->gpu_addr = amdgpu_sa_bo_gpu_addr(ib->sa_bo); in amdgpu_vce_ring_parse_cs()
753 for (idx = 0; idx < ib->length_dw;) { in amdgpu_vce_ring_parse_cs()
754 uint32_t len = amdgpu_ib_get_value(ib, idx); in amdgpu_vce_ring_parse_cs()
755 uint32_t cmd = amdgpu_ib_get_value(ib, idx + 1); in amdgpu_vce_ring_parse_cs()
765 fb_idx = amdgpu_ib_get_value(ib, idx + 6); in amdgpu_vce_ring_parse_cs()
766 bs_idx = amdgpu_ib_get_value(ib, idx + 7); in amdgpu_vce_ring_parse_cs()
770 r = amdgpu_vce_validate_bo(p, ib, idx + 10, idx + 9, in amdgpu_vce_ring_parse_cs()
775 r = amdgpu_vce_validate_bo(p, ib, idx + 12, idx + 11, in amdgpu_vce_ring_parse_cs()
782 r = amdgpu_vce_validate_bo(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
789 tmp = amdgpu_ib_get_value(ib, idx + 4); in amdgpu_vce_ring_parse_cs()
790 r = amdgpu_vce_validate_bo(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
797 r = amdgpu_vce_validate_bo(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
804 r = amdgpu_vce_validate_bo(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
809 r = amdgpu_vce_validate_bo(p, ib, idx + 8, idx + 7, in amdgpu_vce_ring_parse_cs()
819 for (idx = 0; idx < ib->length_dw;) { in amdgpu_vce_ring_parse_cs()
820 uint32_t len = amdgpu_ib_get_value(ib, idx); in amdgpu_vce_ring_parse_cs()
821 uint32_t cmd = amdgpu_ib_get_value(ib, idx + 1); in amdgpu_vce_ring_parse_cs()
825 handle = amdgpu_ib_get_value(ib, idx + 2); in amdgpu_vce_ring_parse_cs()
836 fb_idx = amdgpu_ib_get_value(ib, idx + 6); in amdgpu_vce_ring_parse_cs()
837 bs_idx = amdgpu_ib_get_value(ib, idx + 7); in amdgpu_vce_ring_parse_cs()
852 *size = amdgpu_ib_get_value(ib, idx + 8) * in amdgpu_vce_ring_parse_cs()
853 amdgpu_ib_get_value(ib, idx + 10) * in amdgpu_vce_ring_parse_cs()
882 r = amdgpu_vce_cs_reloc(p, ib, idx + 10, idx + 9, in amdgpu_vce_ring_parse_cs()
887 r = amdgpu_vce_cs_reloc(p, ib, idx + 12, idx + 11, in amdgpu_vce_ring_parse_cs()
898 r = amdgpu_vce_cs_reloc(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
905 tmp = amdgpu_ib_get_value(ib, idx + 4); in amdgpu_vce_ring_parse_cs()
906 r = amdgpu_vce_cs_reloc(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
913 r = amdgpu_vce_cs_reloc(p, ib, idx + 3, idx + 2, in amdgpu_vce_ring_parse_cs()
920 r = amdgpu_vce_cs_reloc(p, ib, idx + 3, in amdgpu_vce_ring_parse_cs()
925 r = amdgpu_vce_cs_reloc(p, ib, idx + 8, in amdgpu_vce_ring_parse_cs()
976 struct amdgpu_ib *ib) in amdgpu_vce_ring_parse_cs_vm() argument
985 while (idx < ib->length_dw) { in amdgpu_vce_ring_parse_cs_vm()
986 uint32_t len = amdgpu_ib_get_value(ib, idx); in amdgpu_vce_ring_parse_cs_vm()
987 uint32_t cmd = amdgpu_ib_get_value(ib, idx + 1); in amdgpu_vce_ring_parse_cs_vm()
997 handle = amdgpu_ib_get_value(ib, idx + 2); in amdgpu_vce_ring_parse_cs_vm()
1046 amdgpu_ib_free(p->adev, ib, NULL); in amdgpu_vce_ring_parse_cs_vm()
1070 struct amdgpu_ib *ib, in amdgpu_vce_ring_emit_ib() argument
1074 amdgpu_ring_write(ring, lower_32_bits(ib->gpu_addr)); in amdgpu_vce_ring_emit_ib()
1075 amdgpu_ring_write(ring, upper_32_bits(ib->gpu_addr)); in amdgpu_vce_ring_emit_ib()
1076 amdgpu_ring_write(ring, ib->length_dw); in amdgpu_vce_ring_emit_ib()