From patchwork Wed Dec 5 10:20:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 10713819 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 861B617D5 for ; Wed, 5 Dec 2018 10:20:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76E3D2CD45 for ; Wed, 5 Dec 2018 10:20:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B6F32CD49; Wed, 5 Dec 2018 10:20:53 +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 18E282CD45 for ; Wed, 5 Dec 2018 10:20:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726961AbeLEKUw (ORCPT ); Wed, 5 Dec 2018 05:20:52 -0500 Received: from lb2-smtp-cloud7.xs4all.net ([194.109.24.28]:47352 "EHLO lb2-smtp-cloud7.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727667AbeLEKUv (ORCPT ); Wed, 5 Dec 2018 05:20:51 -0500 Received: from tschai.fritz.box ([212.251.195.8]) by smtp-cloud7.xs4all.net with ESMTPA id UUIKgznz1aOW5UUITgJek2; Wed, 05 Dec 2018 11:20:50 +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: [PATCHv4 08/10] vim2m: add tag support Date: Wed, 5 Dec 2018 11:20:38 +0100 Message-Id: <20181205102040.11741-9-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181205102040.11741-1-hverkuil-cisco@xs4all.nl> References: <20181205102040.11741-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfJBvDexiEY0pSrleLccKK8Qkrl0Pyg39te+UIJ3BF3yHLQFAoalqhLZ578R0Rt6I1+82yNstcXP4ZYjlHZsTf52x5+qG22i22cP4pDfk087T4tac5Oh0 ATsr30EoLA9V7ORo/Z7SCTCKDDyEU4OShU87kHCgP3moPI5TU1+cJUCGDaHAquTIsyQmxiKDwbkp8Ma+maURjh7fxNDgfFgpcJctOxgtaFVEXlo/M3jp+npP tCuLORHJtLauYwzTgDRRMCqIxCflrZNhtAIrDrg0XksOpybvgbVXgVWowUGiHZJqDzh/2dXlTzNwV6AqgpvWiQX2Y3RNp0SOXr7af/OQXz0ER+I5jIMugk/X pYiImipk39OjtxYwqfbKc2sgmXvb8DcFF6xKfpLqNd06Fb1F+i9ziMZvX77S+XuWQpqk0sOHSCm9xuud5dDKpZ1T8M07Mw== 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); }