Skip to contentSkip to conversation

media: s5p_mfc_dec: delete the redundant code

PATCH New panpan liu 2 participants 2 messages Aug 1, 2014 Media (V4L/DVB)

lore
Share & tools
lore

panpan liu

author
#0 lore raw

PATCH 1/1 media: s5p_mfc_dec: delete the redundant code

Because the api s5p_mfc_queue_setup has already realized the same function

---
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +0 -0
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +1 -8
@@ -544,14 +544,7 @@ static int vidioc_reqbufs(struct file *file, void *priv,
 			mfc_err("vb2_reqbufs on capture failed\n");
 			return ret;
 		}
-		if (reqbufs->count < ctx->pb_count) {
-			mfc_err("Not enough buffers allocated\n");
-			reqbufs->count = 0;
-			s5p_mfc_clock_on();
-			ret = vb2_reqbufs(&ctx->vq_dst, reqbufs);
-			s5p_mfc_clock_off();
-			return -ENOMEM;
-		}
+
 		ctx->total_dpb_count = reqbufs->count;
 		ret = s5p_mfc_hw_call(dev->mfc_ops, alloc_codec_buffers, ctx);
 		if (ret) {

--
1.7.9.5

#1 lore raw

PATCH 1/1 media: s5p_mfc_dec: delete the redundant code

Hi,

Quoted 14 lines · panpan liu

Because the api s5p_mfc_queue_setup has already realized the same function

---
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +0 -0
@@ -544,14 +544,7 @@ static int vidioc_reqbufs(struct file *file, void *priv,
 			mfc_err("vb2_reqbufs on capture failed\n");
 			return ret;

drivers/media/platform/s5p-mfc/s5p_mfc_dec.c static int vidioc_reqbufs(struct file *file, void *priv, · line 547

Quoted 10 lines
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +1 -8
 		}
-		if (reqbufs->count < ctx->pb_count) {
-			mfc_err("Not enough buffers allocated\n");
-			reqbufs->count = 0;
-			s5p_mfc_clock_on();
-			ret = vb2_reqbufs(&ctx->vq_dst, reqbufs);
-			s5p_mfc_clock_off();
-			return -ENOMEM;
-		}
+

As Hans said, you should always check the latest upstream kernel. Why do you post patches based on old kernel at ML continuously?