summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2015-05-13 13:44:39 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2015-06-03 16:48:06 +0900
commit6c0f62d75991cffb9f27e0e45a22e8ea4b06e7e7 (patch)
tree80a4bef6794d4366f2d8a41e76fa45a211b119fe
parent34d04efe393231c3d3474d2d64a542c92485571a (diff)
downloadlinux-3.10-6c0f62d75991cffb9f27e0e45a22e8ea4b06e7e7.tar.gz
linux-3.10-6c0f62d75991cffb9f27e0e45a22e8ea4b06e7e7.tar.bz2
linux-3.10-6c0f62d75991cffb9f27e0e45a22e8ea4b06e7e7.zip
s5p-mfc: fix state check from encoder queue_setup
MFCINST_GOT_INST state is set to encoder context with set_format only for catpure buffer. In queue_setup of encoder called during reqbufs, it is checked MFCINST_GOT_INST state for both capture and output buffer. So this patch fixes to encoder to check MFCINST_GOT_INST state only for capture buffer from queue_setup. Change-Id: I58f449eb48f990a2dcd4ecc06bc775293d1b6396 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_enc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index f05a60ba758..80b8e99bcdf 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -1635,11 +1635,12 @@ static int s5p_mfc_queue_setup(struct vb2_queue *vq,
struct s5p_mfc_ctx *ctx = fh_to_ctx(vq->drv_priv);
struct s5p_mfc_dev *dev = ctx->dev;
- if (ctx->state != MFCINST_GOT_INST) {
- mfc_err("inavlid state: %d\n", ctx->state);
- return -EINVAL;
- }
if (vq->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
+ if (ctx->state != MFCINST_GOT_INST) {
+ mfc_err("inavlid state: %d\n", ctx->state);
+ return -EINVAL;
+ }
+
if (ctx->dst_fmt)
*plane_count = ctx->dst_fmt->num_planes;
else