From patchwork Mon Dec 3 13:51:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 10709609 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 2865F13AF for ; Mon, 3 Dec 2018 13:51:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 194952AFDE for ; Mon, 3 Dec 2018 13:51:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D4CD2AFD6; Mon, 3 Dec 2018 13:51:54 +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 92BB62B018 for ; Mon, 3 Dec 2018 13:51:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726082AbeLCNw6 (ORCPT ); Mon, 3 Dec 2018 08:52:58 -0500 Received: from lb3-smtp-cloud7.xs4all.net ([194.109.24.31]:60316 "EHLO lb3-smtp-cloud7.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725897AbeLCNw6 (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 TodTgVSsf3Hr7TodagJCuO; Mon, 03 Dec 2018 14:51: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: [PATCHv3 6/9] vb2: add new supports_tags queue flag Date: Mon, 3 Dec 2018 14:51:40 +0100 Message-Id: <20181203135143.45487-7-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: MS4wfKvZrTWFyJx5pqld1EVIEexBmLhyizlWuNyDdaPsLhiZjTL3JFPHYa34FOP0nyOy9q50mQp93g4ApLr0HUY86TtfGCyz46iOQWpkWro617FhfcbTGQI4 ApQMev5MqpOqf3mzN+DYAP+xtkhi4LO6QPuj9bqIq2MR94kvaf/lfF9gfUcs03RNcccrQwjjjkKzL4P+RZtp9sdwLciTZwFlQ2I941SwLCjsMxm//Wepnsw0 PycFewz056fZ8pr4y/QBhQJGqLGOat38KYvkpkGV+k0EIK0lmcD6DvCcOtEw9y+iSVRJ8XzQO4mMyE6jhX6+N4ADv/VqcdnVSZB0dGy/tGIE9mCBwqGLWL8Q NWfXecWJSCOqbWPCBLMnGWnylcGoyfeKLaZkzDG1QEaF+FsKA/ehnDCUfckDp6oTUcY4kROesxllcqiQoscbpuUZYjMUdw== 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 Add new flag to indicate that buffer tags are supported. Signed-off-by: Hans Verkuil Reviewed-by: Paul Kocialkowski Reviewed-by: Alexandre Courbot --- drivers/media/common/videobuf2/videobuf2-v4l2.c | 2 ++ include/media/videobuf2-core.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c index ecbf4f0755cb..189dd7fb12c0 100644 --- a/drivers/media/common/videobuf2/videobuf2-v4l2.c +++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c @@ -665,6 +665,8 @@ static void fill_buf_caps(struct vb2_queue *q, u32 *caps) *caps |= V4L2_BUF_CAP_SUPPORTS_DMABUF; if (q->supports_requests) *caps |= V4L2_BUF_CAP_SUPPORTS_REQUESTS; + if (q->supports_tags) + *caps |= V4L2_BUF_CAP_SUPPORTS_TAGS; } int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req) diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index e86981d615ae..81f2dbfd0094 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -473,6 +473,7 @@ struct vb2_buf_ops { * has not been called. This is a vb1 idiom that has been adopted * also by vb2. * @supports_requests: this queue supports the Request API. + * @supports_tags: this queue supports tags in struct v4l2_buffer. * @uses_qbuf: qbuf was used directly for this queue. Set to 1 the first * time this is called. Set to 0 when the queue is canceled. * If this is 1, then you cannot queue buffers from a request. @@ -547,6 +548,7 @@ struct vb2_queue { unsigned allow_zero_bytesused:1; unsigned quirk_poll_must_check_waiting_for_buffers:1; unsigned supports_requests:1; + unsigned supports_tags:1; unsigned uses_qbuf:1; unsigned uses_requests:1;