diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2013-09-30 09:34:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-10-28 13:25:25 -0400 |
commit | 5166028d480c82f9a4d443db7c1a707f8aea285a (patch) | |
tree | db5f439cefa75c981125d7fa02e457969f397398 /drivers/media/platform/coda.c | |
parent | 927933f7b4b213357813b394ca66f7a6ce3d28f2 (diff) |
[media] coda: use picture type returned from hardware
Instead of copying v4l2_buf.flags from the source buffer, set
the destination buffer flags as reported by the hardware codec.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/coda.c')
-rw-r--r-- | drivers/media/platform/coda.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index e70a2728cd6b..82049f858d5c 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c | |||
@@ -2744,7 +2744,6 @@ static void coda_finish_encode(struct coda_ctx *ctx) | |||
2744 | dst_buf = v4l2_m2m_dst_buf_remove(ctx->m2m_ctx); | 2744 | dst_buf = v4l2_m2m_dst_buf_remove(ctx->m2m_ctx); |
2745 | 2745 | ||
2746 | /* Get results from the coda */ | 2746 | /* Get results from the coda */ |
2747 | coda_read(dev, CODA_RET_ENC_PIC_TYPE); | ||
2748 | start_ptr = coda_read(dev, CODA_CMD_ENC_PIC_BB_START); | 2747 | start_ptr = coda_read(dev, CODA_CMD_ENC_PIC_BB_START); |
2749 | wr_ptr = coda_read(dev, CODA_REG_BIT_WR_PTR(ctx->reg_idx)); | 2748 | wr_ptr = coda_read(dev, CODA_REG_BIT_WR_PTR(ctx->reg_idx)); |
2750 | 2749 | ||
@@ -2764,7 +2763,7 @@ static void coda_finish_encode(struct coda_ctx *ctx) | |||
2764 | coda_read(dev, CODA_RET_ENC_PIC_SLICE_NUM); | 2763 | coda_read(dev, CODA_RET_ENC_PIC_SLICE_NUM); |
2765 | coda_read(dev, CODA_RET_ENC_PIC_FLAG); | 2764 | coda_read(dev, CODA_RET_ENC_PIC_FLAG); |
2766 | 2765 | ||
2767 | if (src_buf->v4l2_buf.flags & V4L2_BUF_FLAG_KEYFRAME) { | 2766 | if (coda_read(dev, CODA_RET_ENC_PIC_TYPE) == 0) { |
2768 | dst_buf->v4l2_buf.flags |= V4L2_BUF_FLAG_KEYFRAME; | 2767 | dst_buf->v4l2_buf.flags |= V4L2_BUF_FLAG_KEYFRAME; |
2769 | dst_buf->v4l2_buf.flags &= ~V4L2_BUF_FLAG_PFRAME; | 2768 | dst_buf->v4l2_buf.flags &= ~V4L2_BUF_FLAG_PFRAME; |
2770 | } else { | 2769 | } else { |