mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[jpegd_vdpu2]: Fix error on first jpegd vdpu2 task
The first jpegd vdpu2 will send codec info with normal register access operation. But some old kernel will not support the codec info cmd 403. Then kernel will discard the whole ioctl operation and let the first decoding task failed. So we separate codec info cmd from the normal register access cmd. Change-Id: Ic364c90367a0493f132dc78e76fae3d4fd6011ca Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -587,7 +587,7 @@ static MPP_RET jpegd_setup_pp(JpegdHalCtx *ctx, JpegdSyntax *syntax)
|
|||||||
|
|
||||||
reg->reg41.sw_pp_pipeline_e = ctx->pp_info.pp_enable;
|
reg->reg41.sw_pp_pipeline_e = ctx->pp_info.pp_enable;
|
||||||
|
|
||||||
mpp_log_f("pp_enable %d\n", ctx->pp_info.pp_enable);
|
jpegd_dbg_hal("pp_enable %d\n", ctx->pp_info.pp_enable);
|
||||||
|
|
||||||
if (ctx->pp_info.pp_enable) {
|
if (ctx->pp_info.pp_enable) {
|
||||||
reg->reg41.sw_pp_pipeline_e = 1;
|
reg->reg41.sw_pp_pipeline_e = 1;
|
||||||
|
@@ -387,6 +387,22 @@ MPP_RET mpp_service_cmd_send(void *ctx)
|
|||||||
return MPP_ERR_VALUE;
|
return MPP_ERR_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p->info_count) {
|
||||||
|
if (p->support_set_info) {
|
||||||
|
MppReqV1 mpp_req;
|
||||||
|
|
||||||
|
mpp_req.cmd = MPP_CMD_SEND_CODEC_INFO;
|
||||||
|
mpp_req.flag = MPP_FLAGS_LAST_MSG;
|
||||||
|
mpp_req.size = p->info_count * sizeof(p->info[0]);
|
||||||
|
mpp_req.offset = 0;
|
||||||
|
mpp_req.data_ptr = REQ_DATA_PTR(p->info);
|
||||||
|
ret = mpp_service_ioctl_request(p->server, &mpp_req);
|
||||||
|
if (ret)
|
||||||
|
p->support_set_info = 0;
|
||||||
|
}
|
||||||
|
p->info_count = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* set fd trans info if needed */
|
/* set fd trans info if needed */
|
||||||
if (p->reg_offset_count) {
|
if (p->reg_offset_count) {
|
||||||
MppReqV1 *mpp_req = &p->reqs[p->req_cnt];
|
MppReqV1 *mpp_req = &p->reqs[p->req_cnt];
|
||||||
@@ -411,21 +427,6 @@ MPP_RET mpp_service_cmd_send(void *ctx)
|
|||||||
p->req_cnt++;
|
p->req_cnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->info_count) {
|
|
||||||
if (p->support_set_info) {
|
|
||||||
MppReqV1 *mpp_req = &p->reqs[p->req_cnt];;
|
|
||||||
|
|
||||||
mpp_req->cmd = MPP_CMD_SEND_CODEC_INFO;
|
|
||||||
mpp_req->flag = 0;
|
|
||||||
mpp_req->size = p->info_count * sizeof(p->info[0]);
|
|
||||||
mpp_req->offset = 0;
|
|
||||||
mpp_req->data_ptr = REQ_DATA_PTR(p->info);
|
|
||||||
|
|
||||||
p->req_cnt++;
|
|
||||||
}
|
|
||||||
p->info_count = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* setup flag for multi message request */
|
/* setup flag for multi message request */
|
||||||
if (p->req_cnt > 1) {
|
if (p->req_cnt > 1) {
|
||||||
RK_S32 i;
|
RK_S32 i;
|
||||||
|
Reference in New Issue
Block a user