linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH] [PATCH 0/3] A few patches make s5p-mfc work with Gstreamer
@ 2016-05-07  5:05 ayaka
  2016-05-07  5:05 ` [PATCH 1/3] [media] s5p-mfc: Add handling of buffer freeing reqbufs request ayaka
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ayaka @ 2016-05-07  5:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: m.szyprowski, nicolas.dufresne, shuahkh, javier, mchehab,
	k.debski, jtp.park, kyungmin.park, linux-arm-kernel, linux-media,
	ayaka

A user-space application will follow the V4l2 document, but I meet
a problem when I test it with Gstreamer. I look at the V4l2
document, the driver check the external setting which the
document not cover, so that is what the second patch do.

The first patch comes from chromium project, but I didn't
find it is merged, so I sent it again with new kernel API.
But I have not test it with 4.6-rc6, as I meet sysmmu problem
there.

But all those patches have been confirmed at Linux 4.1.16.


ayaka (3):
  [media] s5p-mfc: Add handling of buffer freeing reqbufs request
  [media] s5p-mfc: remove unnecessary check in try_fmt
  [media] s5p-mfc: fix a typo in s5p_mfc_dec

 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c |  2 +-
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 12 +++---------
 2 files changed, 4 insertions(+), 10 deletions(-)

-- 
2.5.5


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] [media] s5p-mfc: Add handling of buffer freeing reqbufs request
  2016-05-07  5:05 [RESEND PATCH] [PATCH 0/3] A few patches make s5p-mfc work with Gstreamer ayaka
@ 2016-05-07  5:05 ` ayaka
  2016-05-07  5:05 ` [PATCH 2/3] [media] s5p-mfc: remove unnecessary check in try_fmt ayaka
  2016-05-07  5:05 ` [PATCH 3/3] [media] s5p-mfc: fix a typo in s5p_mfc_dec ayaka
  2 siblings, 0 replies; 4+ messages in thread
From: ayaka @ 2016-05-07  5:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: m.szyprowski, nicolas.dufresne, shuahkh, javier, mchehab,
	k.debski, jtp.park, kyungmin.park, linux-arm-kernel, linux-media,
	ayaka

The encoder forget the work to call hardware to release its buffers.
This patch came from chromium project. I just change its code
style and make the API match with new kernel.

Signed-off-by: ayaka <ayaka@soulik.info>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index 034b5c1..a66a9f9 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -1144,7 +1144,10 @@ static int vidioc_reqbufs(struct file *file, void *priv,
 		return -EINVAL;
 	if (reqbufs->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
 		if (reqbufs->count == 0) {
+			mfc_debug(2, "Freeing buffers\n");
 			ret = vb2_reqbufs(&ctx->vq_dst, reqbufs);
+			s5p_mfc_hw_call(dev->mfc_ops, release_codec_buffers,
+					ctx);
 			ctx->capture_state = QUEUE_FREE;
 			return ret;
 		}
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] [media] s5p-mfc: remove unnecessary check in try_fmt
  2016-05-07  5:05 [RESEND PATCH] [PATCH 0/3] A few patches make s5p-mfc work with Gstreamer ayaka
  2016-05-07  5:05 ` [PATCH 1/3] [media] s5p-mfc: Add handling of buffer freeing reqbufs request ayaka
@ 2016-05-07  5:05 ` ayaka
  2016-05-07  5:05 ` [PATCH 3/3] [media] s5p-mfc: fix a typo in s5p_mfc_dec ayaka
  2 siblings, 0 replies; 4+ messages in thread
From: ayaka @ 2016-05-07  5:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: m.szyprowski, nicolas.dufresne, shuahkh, javier, mchehab,
	k.debski, jtp.park, kyungmin.park, linux-arm-kernel, linux-media,
	ayaka

We don't need to request the sizeimage or num_planes
in try_fmt.

Signed-off-by: ayaka <ayaka@soulik.info>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index a66a9f9..2f76aba 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -1043,10 +1043,6 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
 			mfc_err("failed to try output format\n");
 			return -EINVAL;
 		}
-		if (pix_fmt_mp->plane_fmt[0].sizeimage == 0) {
-			mfc_err("must be set encoding output size\n");
-			return -EINVAL;
-		}
 		if ((dev->variant->version_bit & fmt->versions) == 0) {
 			mfc_err("Unsupported format by this MFC version.\n");
 			return -EINVAL;
@@ -1060,11 +1056,6 @@ static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
 			mfc_err("failed to try output format\n");
 			return -EINVAL;
 		}
-
-		if (fmt->num_planes != pix_fmt_mp->num_planes) {
-			mfc_err("failed to try output format\n");
-			return -EINVAL;
-		}
 		if ((dev->variant->version_bit & fmt->versions) == 0) {
 			mfc_err("Unsupported format by this MFC version.\n");
 			return -EINVAL;
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] [media] s5p-mfc: fix a typo in s5p_mfc_dec
  2016-05-07  5:05 [RESEND PATCH] [PATCH 0/3] A few patches make s5p-mfc work with Gstreamer ayaka
  2016-05-07  5:05 ` [PATCH 1/3] [media] s5p-mfc: Add handling of buffer freeing reqbufs request ayaka
  2016-05-07  5:05 ` [PATCH 2/3] [media] s5p-mfc: remove unnecessary check in try_fmt ayaka
@ 2016-05-07  5:05 ` ayaka
  2 siblings, 0 replies; 4+ messages in thread
From: ayaka @ 2016-05-07  5:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: m.szyprowski, nicolas.dufresne, shuahkh, javier, mchehab,
	k.debski, jtp.park, kyungmin.park, linux-arm-kernel, linux-media,
	ayaka

It is a cosmetic commit.

Signed-off-by: ayaka <ayaka@soulik.info>
---
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index f2d6376..391ed9c 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -573,7 +573,7 @@ static int vidioc_reqbufs(struct file *file, void *priv,
 	struct s5p_mfc_ctx *ctx = fh_to_ctx(priv);
 
 	if (reqbufs->memory != V4L2_MEMORY_MMAP) {
-		mfc_err("Only V4L2_MEMORY_MAP is supported\n");
+		mfc_err("Only V4L2_MEMORY_MMAP is supported\n");
 		return -EINVAL;
 	}
 
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-07  5:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-07  5:05 [RESEND PATCH] [PATCH 0/3] A few patches make s5p-mfc work with Gstreamer ayaka
2016-05-07  5:05 ` [PATCH 1/3] [media] s5p-mfc: Add handling of buffer freeing reqbufs request ayaka
2016-05-07  5:05 ` [PATCH 2/3] [media] s5p-mfc: remove unnecessary check in try_fmt ayaka
2016-05-07  5:05 ` [PATCH 3/3] [media] s5p-mfc: fix a typo in s5p_mfc_dec ayaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).