From patchwork Mon Dec 3 13:51:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 10709613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 553B013AF for ; Mon, 3 Dec 2018 13:51:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CC6E2AFDE for ; Mon, 3 Dec 2018 13:51:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CC092B007; Mon, 3 Dec 2018 13:51:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6A122AFE7 for ; Mon, 3 Dec 2018 13:51:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726106AbeLCNxA (ORCPT ); Mon, 3 Dec 2018 08:53:00 -0500 Received: from lb2-smtp-cloud7.xs4all.net ([194.109.24.28]:51384 "EHLO lb2-smtp-cloud7.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbeLCNw6 (ORCPT ); Mon, 3 Dec 2018 08:52:58 -0500 Received: from tschai.fritz.box ([212.251.195.8]) by smtp-cloud7.xs4all.net with ESMTPA id TodTgVSsf3Hr7TodagJCug; Mon, 03 Dec 2018 14:51:51 +0100 From: hverkuil-cisco@xs4all.nl To: linux-media@vger.kernel.org Cc: Alexandre Courbot , maxime.ripard@bootlin.com, paul.kocialkowski@bootlin.com, tfiga@chromium.org, nicolas@ndufresne.ca, sakari.ailus@linux.intel.com, Hans Verkuil Subject: [PATCHv3 7/9] vim2m: add tag support Date: Mon, 3 Dec 2018 14:51:41 +0100 Message-Id: <20181203135143.45487-8-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181203135143.45487-1-hverkuil-cisco@xs4all.nl> References: <20181203135143.45487-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfA6GOB1FMkYJlcf+3ZEuX75mlo4mkglfzvf2fzALXrSlSLf/hwGmPh7bZ4jleKZYp50SpxtDEemIyPuKvRvmUjnOOXrS1Un50C6KBSTF1Zvw6Qcctf1G xkpCKN/vrOVV995bg8MzYq3RBhyCrjDXGpQLs9GnfGFKuOBkNgtjwNQIvCrKBkuKt4usF43DXX1+o0QLoa3mL3dl19tKjhsFoF3IrHpWZWJ/vEflJJqic7vP gC81LCAOvhQUa/R8WNn1JBGJvu9ngl6tZOL7tg+Uvku2AlBdFxowtC4PmmpEtPFB7vavBz03vsZObDv9ROa/aL9wIeVzfu8TToL2hlFa6JHvugWyrzZmT8EY TVGxB/p24d6K/GevWPS7bF/6ME/naOtovRmvbWwJkJCdnlLTkZInlmlKChw830u5rqYvGYDTy3WaPRIBWz64XFQjng+1tw== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hans Verkuil Copy tags in vim2m. Signed-off-by: Hans Verkuil Reviewed-by: Paul Kocialkowski Reviewed-by: Alexandre Courbot --- drivers/media/platform/vim2m.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c index d01821a6906a..be328483a53a 100644 --- a/drivers/media/platform/vim2m.c +++ b/drivers/media/platform/vim2m.c @@ -241,17 +241,7 @@ static int device_process(struct vim2m_ctx *ctx, out_vb->sequence = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE)->sequence++; in_vb->sequence = q_data->sequence++; - out_vb->vb2_buf.timestamp = in_vb->vb2_buf.timestamp; - - if (in_vb->flags & V4L2_BUF_FLAG_TIMECODE) - out_vb->timecode = in_vb->timecode; - out_vb->field = in_vb->field; - out_vb->flags = in_vb->flags & - (V4L2_BUF_FLAG_TIMECODE | - V4L2_BUF_FLAG_KEYFRAME | - V4L2_BUF_FLAG_PFRAME | - V4L2_BUF_FLAG_BFRAME | - V4L2_BUF_FLAG_TSTAMP_SRC_MASK); + v4l2_m2m_buf_copy_data(out_vb, in_vb, true); switch (ctx->mode) { case MEM2MEM_HFLIP | MEM2MEM_VFLIP: @@ -855,6 +845,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *ds src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; src_vq->lock = &ctx->dev->dev_mutex; src_vq->supports_requests = true; + src_vq->supports_tags = true; ret = vb2_queue_init(src_vq); if (ret) @@ -868,6 +859,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *ds dst_vq->mem_ops = &vb2_vmalloc_memops; dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; dst_vq->lock = &ctx->dev->dev_mutex; + dst_vq->supports_tags = true; return vb2_queue_init(dst_vq); }