summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorZhaowei Yuan <zhaowei.yuan@samsung.com>2014-08-12 17:08:18 +0800
committerChanho Park <chanho61.park@samsung.com>2014-11-18 12:00:41 +0900
commit85324810ba0be5411ffa4f9f499454c251dc8901 (patch)
tree47112582c7a66c75b559b770231d8eb7ce2ddeee /drivers
parentf81596045fc090e2f0f9c3ef07e13d31dbbc173e (diff)
downloadlinux-3.10-85324810ba0be5411ffa4f9f499454c251dc8901.tar.gz
linux-3.10-85324810ba0be5411ffa4f9f499454c251dc8901.tar.bz2
linux-3.10-85324810ba0be5411ffa4f9f499454c251dc8901.zip
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 <zhaowei.yuan@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc_dec.c3
1 files changed, 2 insertions, 1 deletions
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) {