From 85324810ba0be5411ffa4f9f499454c251dc8901 Mon Sep 17 00:00:00 2001 From: Zhaowei Yuan Date: Tue, 12 Aug 2014 17:08:18 +0800 Subject: media: s5p_mfc: Mark buffer as requested after it is indeed allocated Ctx->capture_state should be set as QUEUE_BUFS_REQUESTED after the buffer is indeed allocated successfully. Change-Id: I6498733e49adc1186a6007e9f6b4d8953af1dcbe Signed-off-by: Zhaowei Yuan --- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index c6d18d0e2fa..7b18a5055aa 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -534,7 +534,7 @@ static int vidioc_reqbufs(struct file *file, void *priv, mfc_err("Bufs have already been requested\n"); return -EINVAL; } - ctx->capture_state = QUEUE_BUFS_REQUESTED; + s5p_mfc_clock_on(); ret = vb2_reqbufs(&ctx->vq_dst, reqbufs); s5p_mfc_clock_off(); @@ -543,6 +543,7 @@ static int vidioc_reqbufs(struct file *file, void *priv, return ret; } + ctx->capture_state = QUEUE_BUFS_REQUESTED; ctx->total_dpb_count = reqbufs->count; ret = s5p_mfc_hw_call(dev->mfc_ops, alloc_codec_buffers, ctx); if (ret) { -- cgit v1.2.3