All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@collabora.com>
To: linux-media@vger.kernel.org
Cc: Hans Verkuil <hans.verkuil@cisco.com>,
	kernel@collabora.com,
	Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	Tomasz Figa <tfiga@chromium.org>,
	linux-rockchip@lists.infradead.org,
	Heiko Stuebner <heiko@sntech.de>, Jonas Karlman <jonas@kwiboo.se>,
	Ezequiel Garcia <ezequiel@collabora.com>
Subject: [PATCH 03/10] rockchip/vpu: Use v4l2_m2m_buf_copy_data
Date: Tue,  5 Feb 2019 17:24:10 -0300	[thread overview]
Message-ID: <20190205202417.16555-4-ezequiel@collabora.com> (raw)
In-Reply-To: <20190205202417.16555-1-ezequiel@collabora.com>

Use the recently introduced v4l2_m2m_buf_copy_data helper
and get rid of some code.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
---
 drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
index 962412c79b91..c332dbeb9dbc 100644
--- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
+++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
@@ -59,14 +59,7 @@ static void rockchip_vpu_job_finish(struct rockchip_vpu_dev *vpu,
 	src->sequence = ctx->sequence_out++;
 	dst->sequence = ctx->sequence_cap++;
 
-	dst->field = src->field;
-	if (src->flags & V4L2_BUF_FLAG_TIMECODE)
-		dst->timecode = src->timecode;
-	dst->vb2_buf.timestamp = src->vb2_buf.timestamp;
-	dst->flags &= ~(V4L2_BUF_FLAG_TSTAMP_SRC_MASK |
-			V4L2_BUF_FLAG_TIMECODE);
-	dst->flags |= src->flags & (V4L2_BUF_FLAG_TSTAMP_SRC_MASK |
-				    V4L2_BUF_FLAG_TIMECODE);
+	v4l2_m2m_buf_copy_data(src, dst, true);
 
 	avail_size = vb2_plane_size(&dst->vb2_buf, 0) -
 		     ctx->vpu_dst_fmt->header_size;
-- 
2.20.1


WARNING: multiple messages have this Message-ID (diff)
From: Ezequiel Garcia <ezequiel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
To: linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Nicolas Dufresne
	<nicolas.dufresne-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>,
	Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	Jonas Karlman <jonas-uIzNG4q0ceqzQB+pC5nmwQ@public.gmane.org>,
	Tomasz Figa <tfiga-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Hans Verkuil
	<hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
	kernel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org,
	Ezequiel Garcia
	<ezequiel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
Subject: [PATCH 03/10] rockchip/vpu: Use v4l2_m2m_buf_copy_data
Date: Tue,  5 Feb 2019 17:24:10 -0300	[thread overview]
Message-ID: <20190205202417.16555-4-ezequiel@collabora.com> (raw)
In-Reply-To: <20190205202417.16555-1-ezequiel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>

Use the recently introduced v4l2_m2m_buf_copy_data helper
and get rid of some code.

Signed-off-by: Ezequiel Garcia <ezequiel-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---
 drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
index 962412c79b91..c332dbeb9dbc 100644
--- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
+++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
@@ -59,14 +59,7 @@ static void rockchip_vpu_job_finish(struct rockchip_vpu_dev *vpu,
 	src->sequence = ctx->sequence_out++;
 	dst->sequence = ctx->sequence_cap++;
 
-	dst->field = src->field;
-	if (src->flags & V4L2_BUF_FLAG_TIMECODE)
-		dst->timecode = src->timecode;
-	dst->vb2_buf.timestamp = src->vb2_buf.timestamp;
-	dst->flags &= ~(V4L2_BUF_FLAG_TSTAMP_SRC_MASK |
-			V4L2_BUF_FLAG_TIMECODE);
-	dst->flags |= src->flags & (V4L2_BUF_FLAG_TSTAMP_SRC_MASK |
-				    V4L2_BUF_FLAG_TIMECODE);
+	v4l2_m2m_buf_copy_data(src, dst, true);
 
 	avail_size = vb2_plane_size(&dst->vb2_buf, 0) -
 		     ctx->vpu_dst_fmt->header_size;
-- 
2.20.1

  parent reply	other threads:[~2019-02-05 20:24 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05 20:24 [PATCH v1 00/10] Add MPEG-2 decoding to Rockchip VPU Ezequiel Garcia
2019-02-05 20:24 ` Ezequiel Garcia
2019-02-05 20:24 ` [PATCH 01/10] media: Introduce helpers to fill pixel format structs Ezequiel Garcia
2019-02-05 20:24   ` Ezequiel Garcia
2019-02-06 10:43   ` Hans Verkuil
2019-02-06 10:43     ` Hans Verkuil
2019-02-06 16:22     ` Ezequiel Garcia
2019-02-06 16:22       ` Ezequiel Garcia
2019-02-06 16:36       ` Hans Verkuil
2019-02-06 16:36         ` Hans Verkuil
2019-02-20  6:53         ` Tomasz Figa
2019-02-20  6:53           ` Tomasz Figa
2019-02-20  8:39           ` Hans Verkuil
2019-02-20  8:39             ` Hans Verkuil
2019-02-21 19:26             ` Ezequiel Garcia
2019-02-21 19:26               ` Ezequiel Garcia
2019-02-05 20:24 ` [PATCH 02/10] rockchip/vpu: Use pixel format helpers Ezequiel Garcia
2019-02-05 20:24   ` Ezequiel Garcia
2019-02-05 20:24 ` Ezequiel Garcia [this message]
2019-02-05 20:24   ` [PATCH 03/10] rockchip/vpu: Use v4l2_m2m_buf_copy_data Ezequiel Garcia
2019-02-05 20:24 ` [PATCH 04/10] rockchip/vpu: Cleanup macroblock alignment Ezequiel Garcia
2019-02-05 20:24   ` Ezequiel Garcia
2019-02-05 20:24 ` [PATCH 05/10] rockchip/vpu: Cleanup JPEG bounce buffer management Ezequiel Garcia
2019-02-05 20:24   ` Ezequiel Garcia
2019-02-05 20:24 ` [PATCH 06/10] rockchip/vpu: Open-code media controller register Ezequiel Garcia
2019-02-05 20:24   ` Ezequiel Garcia
2019-02-05 20:24 ` [PATCH 07/10] rockchip/vpu: Support the Request API Ezequiel Garcia
2019-02-05 20:24   ` Ezequiel Garcia
2019-02-05 20:24 ` [PATCH 08/10] rockchip/vpu: Add decoder boilerplate Ezequiel Garcia
2019-02-05 20:24   ` Ezequiel Garcia
2019-02-05 20:24 ` [PATCH 09/10] rockchip/vpu: Add support for non-standard controls Ezequiel Garcia
2019-02-05 20:24   ` Ezequiel Garcia
2019-02-05 20:24 ` [PATCH 10/10] rockchip/vpu: Add support for MPEG-2 decoding Ezequiel Garcia
2019-02-05 20:24   ` Ezequiel Garcia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190205202417.16555-4-ezequiel@collabora.com \
    --to=ezequiel@collabora.com \
    --cc=hans.verkuil@cisco.com \
    --cc=heiko@sntech.de \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=nicolas.dufresne@collabora.com \
    --cc=tfiga@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.