diff options
author | Zhaowei Yuan <zhaowei.yuan@samsung.com> | 2014-08-12 17:08:18 +0800 |
---|---|---|
committer | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2014-08-25 03:03:54 -0700 |
commit | 028163eb61c492cc4a54038c6b188577a6a94f5b (patch) | |
tree | 3f7ae6091f040d91baa4dd11ba4e5bf2136247aa | |
parent | bac26d261e96953624a1f2aa6150068264eeb416 (diff) | |
download | linux-3.10-028163eb61c492cc4a54038c6b188577a6a94f5b.tar.gz linux-3.10-028163eb61c492cc4a54038c6b188577a6a94f5b.tar.bz2 linux-3.10-028163eb61c492cc4a54038c6b188577a6a94f5b.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>
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 3 |
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) { |