diff options
author | Huang Chaofan <chaofan.huang@nxp.com> | 2018-06-04 18:29:07 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | d1d7c4b72dbbd5b1819a9381a7782e65eb346ee5 (patch) | |
tree | 84a821c0442f4b585d3c181ae63a99d53d21e7ba /drivers/mxc/vpu-decoder-b0 | |
parent | 2c56043eaee88af49edd9538e1e4da1d9f39ef78 (diff) |
MLK-18495 VPU: Add the event VID_API_EVENT_FIRMWARE_XCPT and modify interlaced flag
Add the event VID_API_EVENT_FIRMWARE_XCPT and modify interlaced flag for
vpu decoder
Signed-off-by: Huang Chaofan <chaofan.huang@nxp.com>
Diffstat (limited to 'drivers/mxc/vpu-decoder-b0')
-rw-r--r-- | drivers/mxc/vpu-decoder-b0/mediasys_types.h | 2 | ||||
-rw-r--r-- | drivers/mxc/vpu-decoder-b0/vpu_b0.c | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/mxc/vpu-decoder-b0/mediasys_types.h b/drivers/mxc/vpu-decoder-b0/mediasys_types.h index 137f6f95316a..947aad663b65 100644 --- a/drivers/mxc/vpu-decoder-b0/mediasys_types.h +++ b/drivers/mxc/vpu-decoder-b0/mediasys_types.h @@ -197,7 +197,7 @@ typedef enum { VID_API_EVENT_RET_PING = 0x14, /* Temp here - rationalise debug events at bottom */ VID_API_EVENT_QMETER = 0x15, VID_API_EVENT_STR_FMT_CHANGE = 0x16, - VID_API_EVENT_MIPS_XCPT = 0x17, + VID_API_EVENT_FIRMWARE_XCPT = 0x17, VID_API_EVENT_START_DONE = 0x18, VID_API_EVENT_STOPPED = 0x19, VID_API_EVENT_ABORT_DONE = 0x1A, diff --git a/drivers/mxc/vpu-decoder-b0/vpu_b0.c b/drivers/mxc/vpu-decoder-b0/vpu_b0.c index 10f04e5e3661..239e5539bc5c 100644 --- a/drivers/mxc/vpu-decoder-b0/vpu_b0.c +++ b/drivers/mxc/vpu-decoder-b0/vpu_b0.c @@ -116,7 +116,7 @@ static char *event2str[] = { "VID_API_EVENT_RET_PING", "VID_API_EVENT_QMETER", "VID_API_EVENT_STR_FMT_CHANGED", - "VID_API_EVENT_MIPS_XCPT", + "VID_API_EVENT_FIRMWARE_XCPT", "VID_API_EVENT_START_DONE", "VID_API_EVENT_STOPPED", "VID_API_EVENT_ABORT_DONE", @@ -1499,7 +1499,10 @@ static void vpu_api_event_handler(struct vpu_ctx *ctx, u_int32 uStrIdx, u_int32 vpu_dbg(LVL_ERR, "error: buffer(%d) need to set FRAME_DECODED, but previous state %s is not FRAME_FREE\n", buffer_id, bufstat[ctx->q_data[V4L2_DST].vb2_reqs[buffer_id].status]); ctx->q_data[V4L2_DST].vb2_reqs[buffer_id].status = FRAME_DECODED; - ctx->q_data[V4L2_DST].vb2_reqs[buffer_id].bfield = pDispInfo->bTopFldFirst; + if ((pDispInfo->bTopFldFirst == 1) && (pPicInfo[uStrIdx].uPicStruct == 2))//uPicStruct == 2 is field + ctx->q_data[V4L2_DST].vb2_reqs[buffer_id].bfield = true; + else + ctx->q_data[V4L2_DST].vb2_reqs[buffer_id].bfield = false; } break; case VID_API_EVENT_SEQ_HDR_FOUND: { @@ -1809,7 +1812,10 @@ static void vpu_api_event_handler(struct vpu_ctx *ctx, u_int32 uStrIdx, u_int32 v4l2_event_queue_fh(&ctx->fh, &ev); //notfiy app stream eos reached } break; + case VID_API_EVENT_FIRMWARE_XCPT: + vpu_dbg(LVL_ERR, "warning: FIRMWARE hang, and send event VID_API_EVENT_FIRMWARE_XCPT\n"); default: + vpu_dbg(LVL_ERR, "warning: uEvent %d is not handled\n", uEvent); break; } vpu_dbg(LVL_INFO, "leave %s, uEvent %d\n", __func__, uEvent); |