Lines Matching refs:ib_cpu
175 static uint32_t *ib_cpu;
318 &ib_handle, (void**)&ib_cpu,
477 ib_cpu[(*idx)++] = reg[vcn_reg_index].data0;
478 ib_cpu[(*idx)++] = addr;
479 ib_cpu[(*idx)++] = reg[vcn_reg_index].data1;
480 ib_cpu[(*idx)++] = addr >> 32;
481 ib_cpu[(*idx)++] = reg[vcn_reg_index].cmd;
482 ib_cpu[(*idx)++] = cmd << 1;
491 amdgpu_cs_sq_head(ib_cpu, idx, false);
493 ib_header = (rvcn_decode_ib_package_t *)&ib_cpu[*idx];
501 decode_buffer = (rvcn_decode_buffer_t *)&(ib_cpu[*idx]);
582 ib_cpu[len++] = reg[vcn_reg_index].data0;
583 ib_cpu[len++] = msg_buf.addr;
584 ib_cpu[len++] = reg[vcn_reg_index].data1;
585 ib_cpu[len++] = msg_buf.addr >> 32;
586 ib_cpu[len++] = reg[vcn_reg_index].cmd;
587 ib_cpu[len++] = 0;
589 ib_cpu[len++] = reg[vcn_reg_index].nop;
590 ib_cpu[len++] = 0;
595 amdgpu_cs_sq_ib_tail(ib_cpu + len);
668 ib_cpu[len++] = reg[vcn_reg_index].cntl;
669 ib_cpu[len++] = 0x1;
671 ib_cpu[len++] = reg[vcn_reg_index].nop;
672 ib_cpu[len++] = 0;
677 amdgpu_cs_sq_ib_tail(ib_cpu + len);
715 ib_cpu[len++] = reg[vcn_reg_index].data0;
716 ib_cpu[len++] = msg_buf.addr;
717 ib_cpu[len++] = reg[vcn_reg_index].data1;
718 ib_cpu[len++] = msg_buf.addr >> 32;
719 ib_cpu[len++] = reg[vcn_reg_index].cmd;
720 ib_cpu[len++] = 0;
722 ib_cpu[len++] = reg[vcn_reg_index].nop;
723 ib_cpu[len++] = 0;
728 amdgpu_cs_sq_ib_tail(ib_cpu + len);
780 amdgpu_cs_sq_head(ib_cpu, &len, true);
784 st_size = &ib_cpu[len++]; /* size */
785 ib_cpu[len++] = 0x00000001; /* RENCODE_IB_PARAM_SESSION_INFO */
786 ib_cpu[len++] = ((fw_maj << 16) | (fw_min << 0));
787 ib_cpu[len++] = enc_buf.addr >> 32;
788 ib_cpu[len++] = enc_buf.addr;
789 ib_cpu[len++] = 1; /* RENCODE_ENGINE_TYPE_ENCODE; */
795 st_size = &ib_cpu[len++]; /* size */
796 ib_cpu[len++] = 0x00000002; /* RENCODE_IB_PARAM_TASK_INFO */
797 p_task_size = &ib_cpu[len++];
798 ib_cpu[len++] = enc_task_id++; /* task_id */
799 ib_cpu[len++] = 0; /* feedback */
804 st_size = &ib_cpu[len++]; /* size */
805 ib_cpu[len++] = 0x01000001; /* RENCODE_IB_OP_INITIALIZE */
810 st_size = &ib_cpu[len++]; /* size */
811 ib_cpu[len++] = 0x00000003; /* RENCODE_IB_PARAM_SESSION_INIT */
812 ib_cpu[len++] = 1; /* RENCODE_ENCODE_STANDARD_H264 */
813 ib_cpu[len++] = width;
814 ib_cpu[len++] = height;
815 ib_cpu[len++] = 0;
816 ib_cpu[len++] = 0;
817 ib_cpu[len++] = 0; /* pre encode mode */
818 ib_cpu[len++] = 0; /* chroma enabled : false */
819 ib_cpu[len++] = 0;
820 ib_cpu[len++] = 0;
825 st_size = &ib_cpu[len++]; /* size */
826 ib_cpu[len++] = 0x00200001; /* RENCODE_H264_IB_PARAM_SLICE_CONTROL */
827 ib_cpu[len++] = 0; /* RENCODE_H264_SLICE_CONTROL_MODE_FIXED_MBS */
828 ib_cpu[len++] = ALIGN(width, 16) / 16 * ALIGN(height, 16) / 16;
833 st_size = &ib_cpu[len++]; /* size */
834 ib_cpu[len++] = 0x00200002; /* RENCODE_H264_IB_PARAM_SPEC_MISC */
835 ib_cpu[len++] = 0; /* constrained intra pred flag */
836 ib_cpu[len++] = 0; /* cabac enable */
837 ib_cpu[len++] = 0; /* cabac init idc */
838 ib_cpu[len++] = 1; /* half pel enabled */
839 ib_cpu[len++] = 1; /* quarter pel enabled */
840 ib_cpu[len++] = 100; /* BASELINE profile */
841 ib_cpu[len++] = 11; /* level */
843 ib_cpu[len++] = 0; /* b_picture_enabled */
844 ib_cpu[len++] = 0; /* weighted_bipred_idc */
850 st_size = &ib_cpu[len++]; /* size */
851 ib_cpu[len++] = 0x00200004; /* RENCODE_H264_IB_PARAM_DEBLOCKING_FILTER */
852 ib_cpu[len++] = 0; /* disable deblocking filter idc */
853 ib_cpu[len++] = 0; /* alpha c0 offset */
854 ib_cpu[len++] = 0; /* tc offset */
855 ib_cpu[len++] = 0; /* cb offset */
856 ib_cpu[len++] = 0; /* cr offset */
861 st_size = &ib_cpu[len++]; /* size */
862 ib_cpu[len++] = 0x00000004; /* RENCODE_IB_PARAM_LAYER_CONTROL */
863 ib_cpu[len++] = 1; /* max temporal layer */
864 ib_cpu[len++] = 1; /* no of temporal layer */
869 st_size = &ib_cpu[len++]; /* size */
870 ib_cpu[len++] = 0x00000006; /* RENCODE_IB_PARAM_RATE_CONTROL_SESSION_INIT */
871 ib_cpu[len++] = 0; /* rate control */
872 ib_cpu[len++] = 48; /* vbv buffer level */
877 st_size = &ib_cpu[len++]; /* size */
878 ib_cpu[len++] = 0x00000009; /* RENCODE_IB_PARAM_QUALITY_PARAMS */
879 ib_cpu[len++] = 0; /* vbaq mode */
880 ib_cpu[len++] = 0; /* scene change sensitivity */
881 ib_cpu[len++] = 0; /* scene change min idr interval */
882 ib_cpu[len++] = 0;
884 ib_cpu[len++] = 0;
889 st_size = &ib_cpu[len++]; /* size */
890 ib_cpu[len++] = 0x00000005; /* RENCODE_IB_PARAM_LAYER_SELECT */
891 ib_cpu[len++] = 0; /* temporal layer */
896 st_size = &ib_cpu[len++]; /* size */
897 ib_cpu[len++] = 0x00000007; /* RENCODE_IB_PARAM_RATE_CONTROL_LAYER_INIT */
898 ib_cpu[len++] = 0;
899 ib_cpu[len++] = 0;
900 ib_cpu[len++] = 25;
901 ib_cpu[len++] = 1;
902 ib_cpu[len++] = 0x01312d00;
903 ib_cpu[len++] = 0;
904 ib_cpu[len++] = 0;
905 ib_cpu[len++] = 0;
910 st_size = &ib_cpu[len++]; /* size */
911 ib_cpu[len++] = 0x00000005; /* RENCODE_IB_PARAM_LAYER_SELECT */
912 ib_cpu[len++] = 0; /* temporal layer */
917 st_size = &ib_cpu[len++]; /* size */
918 ib_cpu[len++] = 0x00000008; /* RENCODE_IB_PARAM_RATE_CONTROL_PER_PICTURE */
919 ib_cpu[len++] = 20;
920 ib_cpu[len++] = 0;
921 ib_cpu[len++] = 51;
922 ib_cpu[len++] = 0;
923 ib_cpu[len++] = 1;
924 ib_cpu[len++] = 0;
925 ib_cpu[len++] = 1;
926 ib_cpu[len++] = 0;
931 st_size = &ib_cpu[len++]; /* size */
932 ib_cpu[len++] = 0x01000004; /* RENCODE_IB_OP_INIT_RC */
937 st_size = &ib_cpu[len++]; /* size */
938 ib_cpu[len++] = 0x01000005; /* RENCODE_IB_OP_INIT_RC_VBV_BUFFER_LEVEL */
944 amdgpu_cs_sq_ib_tail(ib_cpu + len);
1282 ib_cpu[(*len)++] = 0;
1337 amdgpu_cs_sq_head(ib_cpu, &len, true);
1341 st_size = &ib_cpu[len++]; /* size */
1342 ib_cpu[len++] = 0x00000001; /* RENCODE_IB_PARAM_SESSION_INFO */
1343 ib_cpu[len++] = ((fw_maj << 16) | (fw_min << 0));
1344 ib_cpu[len++] = enc_buf.addr >> 32;
1345 ib_cpu[len++] = enc_buf.addr;
1346 ib_cpu[len++] = 1; /* RENCODE_ENGINE_TYPE_ENCODE */;
1352 st_size = &ib_cpu[len++]; /* size */
1353 ib_cpu[len++] = 0x00000002; /* RENCODE_IB_PARAM_TASK_INFO */
1354 p_task_size = &ib_cpu[len++];
1355 ib_cpu[len++] = enc_task_id++; /* task_id */
1356 ib_cpu[len++] = 1; /* feedback */
1362 st_size = &ib_cpu[len++]; /* size */
1364 ib_cpu[len++] = 0x00000020; /* RENCODE_IB_PARAM_DIRECT_OUTPUT_NALU vcn 1 */
1366 ib_cpu[len++] = 0x0000000a; /* RENCODE_IB_PARAM_DIRECT_OUTPUT_NALU other vcn */
1367 ib_cpu[len++] = 0x00000002; /* RENCODE_DIRECT_OUTPUT_NALU_TYPE_SPS */
1368 ib_cpu[len++] = 0x00000011; /* sps len */
1369 ib_cpu[len++] = 0x00000001; /* start code */
1370 ib_cpu[len++] = 0x6764440b;
1371 ib_cpu[len++] = 0xac54c284;
1372 ib_cpu[len++] = 0x68078442;
1373 ib_cpu[len++] = 0x37000000;
1378 st_size = &ib_cpu[len++]; /* size */
1380 ib_cpu[len++] = 0x00000020; /* RENCODE_IB_PARAM_DIRECT_OUTPUT_NALU vcn 1*/
1382 ib_cpu[len++] = 0x0000000a; /* RENCODE_IB_PARAM_DIRECT_OUTPUT_NALU other vcn*/
1383 ib_cpu[len++] = 0x00000003; /* RENCODE_DIRECT_OUTPUT_NALU_TYPE_PPS */
1384 ib_cpu[len++] = 0x00000008; /* pps len */
1385 ib_cpu[len++] = 0x00000001; /* start code */
1386 ib_cpu[len++] = 0x68ce3c80;
1392 st_size = &ib_cpu[len++]; /* size */
1394 ib_cpu[len++] = 0x0000000a; /* RENCODE_IB_PARAM_SLICE_HEADER vcn 1 */
1396 ib_cpu[len++] = 0x0000000b; /* RENCODE_IB_PARAM_SLICE_HEADER other vcn */
1398 ib_cpu[len++] = 0x65000000;
1399 ib_cpu[len++] = 0x11040000;
1401 ib_cpu[len++] = 0x41000000;
1402 ib_cpu[len++] = 0x34210000;
1404 ib_cpu[len++] = 0xe0000000;
1407 ib_cpu[len++] = 0x00000001;
1408 ib_cpu[len++] = 0x00000008;
1409 ib_cpu[len++] = 0x00020000;
1410 ib_cpu[len++] = 0x00000000;
1411 ib_cpu[len++] = 0x00000001;
1412 ib_cpu[len++] = 0x00000015;
1413 ib_cpu[len++] = 0x00020001;
1414 ib_cpu[len++] = 0x00000000;
1415 ib_cpu[len++] = 0x00000001;
1416 ib_cpu[len++] = 0x00000003;
1422 st_size = &ib_cpu[len++]; /* size */
1424 ib_cpu[len++] = 0x0000000b; /* RENCODE_IB_PARAM_ENCODE_PARAMS vcn 1 */
1426 ib_cpu[len++] = 0x0000000f; /* RENCODE_IB_PARAM_ENCODE_PARAMS other vcn */
1427 ib_cpu[len++] = frame_type;
1428 ib_cpu[len++] = 0x0001f000;
1429 ib_cpu[len++] = input_buf.addr >> 32;
1430 ib_cpu[len++] = input_buf.addr;
1431 ib_cpu[len++] = (input_buf.addr + ALIGN(width, 256) * ALIGN(height, 32)) >> 32;
1432 ib_cpu[len++] = input_buf.addr + ALIGN(width, 256) * ALIGN(height, 32);
1433 ib_cpu[len++] = 0x00000100;
1434 ib_cpu[len++] = 0x00000080;
1435 ib_cpu[len++] = 0x00000000;
1436 ib_cpu[len++] = 0xffffffff;
1437 ib_cpu[len++] = 0x00000000;
1442 st_size = &ib_cpu[len++]; /* size */
1443 ib_cpu[len++] = 0x00200003; /* RENCODE_H264_IB_PARAM_ENCODE_PARAMS */
1445 ib_cpu[len++] = 0x00000000;
1446 ib_cpu[len++] = 0x00000000;
1447 ib_cpu[len++] = 0x00000000;
1448 ib_cpu[len++] = 0xffffffff;
1450 ib_cpu[len++] = 0x00000000;
1451 ib_cpu[len++] = 0x00000000;
1452 ib_cpu[len++] = 0x00000000;
1453 ib_cpu[len++] = 0x00000000;
1454 ib_cpu[len++] = 0x00000000;
1455 ib_cpu[len++] = 0x00000000;
1456 ib_cpu[len++] = 0x00000000;
1457 ib_cpu[len++] = 0xffffffff;
1458 ib_cpu[len++] = 0x00000000;
1459 ib_cpu[len++] = 0x00000000;
1460 ib_cpu[len++] = 0x00000000;
1461 ib_cpu[len++] = 0x00000000;
1462 ib_cpu[len++] = 0xffffffff;
1463 ib_cpu[len++] = 0x00000000;
1464 ib_cpu[len++] = 0x00000000;
1465 ib_cpu[len++] = 0x00000000;
1466 ib_cpu[len++] = 0x00000000;
1467 ib_cpu[len++] = 0x00000001;
1473 st_size = &ib_cpu[len++]; /* size */
1475 ib_cpu[len++] = 0x0000000d; /* ENCODE_CONTEXT_BUFFER vcn 1 */
1477 ib_cpu[len++] = 0x00000011; /* ENCODE_CONTEXT_BUFFER other vcn */
1478 ib_cpu[len++] = cpb_buf.addr >> 32;
1479 ib_cpu[len++] = cpb_buf.addr;
1480 ib_cpu[len++] = 0x00000000; /* swizzle mode */
1481 ib_cpu[len++] = 0x00000100; /* luma pitch */
1482 ib_cpu[len++] = 0x00000100; /* chroma pitch */
1483 ib_cpu[len++] = 0x00000002; /* no reconstructed picture */
1484 ib_cpu[len++] = 0x00000000; /* reconstructed pic 1 luma offset */
1485 ib_cpu[len++] = ALIGN(width, 256) * ALIGN(height, 32); /* pic1 chroma offset */
1488 ib_cpu[len++] = ALIGN(width, 256) * ALIGN(height, 32) * 3 / 2; /* pic2 luma offset */
1489 ib_cpu[len++] = ALIGN(width, 256) * ALIGN(height, 32) * 5 / 2; /* pic2 chroma offset */
1496 st_size = &ib_cpu[len++]; /* size */
1498 ib_cpu[len++] = 0x0000000e; /* VIDEO_BITSTREAM_BUFFER vcn 1 */
1500 ib_cpu[len++] = 0x00000012; /* VIDEO_BITSTREAM_BUFFER other vcn */
1502 ib_cpu[len++] = 0x00000000; /* mode */
1503 ib_cpu[len++] = bs_buf.addr >> 32;
1504 ib_cpu[len++] = bs_buf.addr;
1505 ib_cpu[len++] = 0x0001f000;
1506 ib_cpu[len++] = 0x00000000;
1511 st_size = &ib_cpu[len++]; /* size */
1513 ib_cpu[len++] = 0x00000010; /* FEEDBACK_BUFFER vcn 1 */
1515 ib_cpu[len++] = 0x00000015; /* FEEDBACK_BUFFER vcn 2,3 */
1516 ib_cpu[len++] = 0x00000000;
1517 ib_cpu[len++] = fb_buf.addr >> 32;
1518 ib_cpu[len++] = fb_buf.addr;
1519 ib_cpu[len++] = 0x00000010;
1520 ib_cpu[len++] = 0x00000028;
1525 st_size = &ib_cpu[len++];
1527 ib_cpu[len++] = 0x0000000c; /* INTRA_REFRESH vcn 1 */
1529 ib_cpu[len++] = 0x00000010; /* INTRA_REFRESH vcn 2,3 */
1530 ib_cpu[len++] = 0x00000000;
1531 ib_cpu[len++] = 0x00000000;
1532 ib_cpu[len++] = 0x00000000;
1538 st_size = &ib_cpu[len++];
1539 ib_cpu[len++] = 0x0000000c;
1540 ib_cpu[len++] = 0x00000000; /* RENCODE_COLOR_VOLUME_G22_BT709 */
1541 ib_cpu[len++] = 0x00000000;
1542 ib_cpu[len++] = 0x00000000;
1543 ib_cpu[len++] = 0x00000000;
1544 ib_cpu[len++] = 0x00000000;
1545 ib_cpu[len++] = 0x00000000; /* RENCODE_COLOR_BIT_DEPTH_8_BIT */
1546 ib_cpu[len++] = 0x00000000; /* RENCODE_COLOR_PACKING_FORMAT_NV12 */
1551 st_size = &ib_cpu[len++];
1552 ib_cpu[len++] = 0x0000000d;
1553 ib_cpu[len++] = 0x00000000; /* RENCODE_COLOR_VOLUME_G22_BT709 */
1554 ib_cpu[len++] = 0x00000000;
1555 ib_cpu[len++] = 0x00000000;
1556 ib_cpu[len++] = 0x00000000; /* RENCODE_COLOR_BIT_DEPTH_8_BIT */
1561 st_size = &ib_cpu[len++];
1562 ib_cpu[len++] = 0x01000006; /* SPEED_ENCODING_MODE */
1567 st_size = &ib_cpu[len++];
1568 ib_cpu[len++] = 0x01000003;
1574 amdgpu_cs_sq_ib_tail(ib_cpu + len);
1614 amdgpu_cs_sq_head(ib_cpu, &len, true);
1618 st_size = &ib_cpu[len++]; /* size */
1619 ib_cpu[len++] = 0x00000001; /* RENCODE_IB_PARAM_SESSION_INFO */
1620 ib_cpu[len++] = ((fw_maj << 16) | (fw_min << 0));
1621 ib_cpu[len++] = enc_buf.addr >> 32;
1622 ib_cpu[len++] = enc_buf.addr;
1623 ib_cpu[len++] = 1; /* RENCODE_ENGINE_TYPE_ENCODE; */
1629 st_size = &ib_cpu[len++]; /* size */
1630 ib_cpu[len++] = 0x00000002; /* RENCODE_IB_PARAM_TASK_INFO */
1631 p_task_size = &ib_cpu[len++];
1632 ib_cpu[len++] = enc_task_id++; /* task_id */
1633 ib_cpu[len++] = 0; /* feedback */
1638 st_size = &ib_cpu[len++];
1639 ib_cpu[len++] = 0x01000002; /* RENCODE_IB_OP_CLOSE_SESSION */
1645 amdgpu_cs_sq_ib_tail(ib_cpu + len);