#define VP9_PROBS_TABLE_SIZE (RDECODE_VP9_PROBS_DATA_SIZE + 256)
#define RDECODE_SESSION_CONTEXT_SIZE (128 * 1024)
-#define RDECODE_GPCOM_VCPU_CMD 0x2070c
-#define RDECODE_GPCOM_VCPU_DATA0 0x20710
-#define RDECODE_GPCOM_VCPU_DATA1 0x20714
-#define RDECODE_ENGINE_CNTL 0x20718
+#define RDECODE_VCN1_GPCOM_VCPU_CMD 0x2070c
+#define RDECODE_VCN1_GPCOM_VCPU_DATA0 0x20710
+#define RDECODE_VCN1_GPCOM_VCPU_DATA1 0x20714
+#define RDECODE_VCN1_ENGINE_CNTL 0x20718
+
+#define RDECODE_VCN2_GPCOM_VCPU_CMD (0x503 << 2)
+#define RDECODE_VCN2_GPCOM_VCPU_DATA0 (0x504 << 2)
+#define RDECODE_VCN2_GPCOM_VCPU_DATA1 (0x505 << 2)
+#define RDECODE_VCN2_ENGINE_CNTL (0x506 << 2)
#define NUM_MPEG2_REFS 6
#define NUM_H264_REFS 17
addr = dec->ws->buffer_get_virtual_address(buf);
addr = addr + off;
- set_reg(dec, RDECODE_GPCOM_VCPU_DATA0, addr);
- set_reg(dec, RDECODE_GPCOM_VCPU_DATA1, addr >> 32);
- set_reg(dec, RDECODE_GPCOM_VCPU_CMD, cmd << 1);
+ set_reg(dec, dec->reg.data0, addr);
+ set_reg(dec, dec->reg.data1, addr >> 32);
+ set_reg(dec, dec->reg.cmd, cmd << 1);
}
/* do the codec needs an IT buffer ?*/
else if (have_probs(dec))
send_cmd(dec, RDECODE_CMD_PROB_TBL_BUFFER, msg_fb_it_probs_buf->res->buf,
FB_BUFFER_OFFSET + FB_BUFFER_SIZE, RADEON_USAGE_READ, RADEON_DOMAIN_GTT);
- set_reg(dec, RDECODE_ENGINE_CNTL, 1);
+ set_reg(dec, dec->reg.cntl, 1);
}
/**
return;
dec->send_cmd(dec, target, picture);
-
flush(dec, PIPE_FLUSH_ASYNC);
next_buffer(dec);
}
}
si_vid_clear_buffer(context, &dec->sessionctx);
+ if (sctx->family >= CHIP_NAVI10) {
+ dec->reg.data0 = RDECODE_VCN2_GPCOM_VCPU_DATA0;
+ dec->reg.data1 = RDECODE_VCN2_GPCOM_VCPU_DATA1;
+ dec->reg.cmd = RDECODE_VCN2_GPCOM_VCPU_CMD;
+ dec->reg.cntl = RDECODE_VCN2_ENGINE_CNTL;
+ } else {
+ dec->reg.data0 = RDECODE_VCN1_GPCOM_VCPU_DATA0;
+ dec->reg.data1 = RDECODE_VCN1_GPCOM_VCPU_DATA1;
+ dec->reg.cmd = RDECODE_VCN1_GPCOM_VCPU_CMD;
+ dec->reg.cntl = RDECODE_VCN1_ENGINE_CNTL;
+ }
+
map_msg_fb_it_probs_buf(dec);
rvcn_dec_message_create(dec);
send_msg_buf(dec);