aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2015-05-13 04:25:25 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-11 06:24:08 -0300
commitd44da04682033ad4c34d97861aef8ad5f7a8c2b5 (patch)
treed670f9d327f7279dd50159577379e1e36706bf2a /drivers/media/platform
parent[media] s5p-tv: fix wait_event_timeout return handling (diff)
downloadlinux-dev-d44da04682033ad4c34d97861aef8ad5f7a8c2b5.tar.xz
linux-dev-d44da04682033ad4c34d97861aef8ad5f7a8c2b5.zip
[media] s5p-mfc: fix state check from encoder queue_setup
MFCINST_GOT_INST state is set to encoder context with set_format only for capture 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 encoder to check MFCINST_GOT_INST state only for capture buffer from queue_setup. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform')
-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 e65993f4b901..2e57e9f45b85 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -1819,11 +1819,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