From: Zhaowei Yuan Date: Tue, 12 Aug 2014 09:08:18 +0000 (+0800) Subject: media: s5p_mfc: Mark buffer as requested after it is indeed allocated X-Git-Tag: accepted/tizen/common/20141006.135346~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=028163eb61c492cc4a54038c6b188577a6a94f5b;p=platform%2Fkernel%2Flinux-3.10.git 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 --- diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index c6d18d0..7b18a50 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) {