From patchwork Mon Feb 11 09:18:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 10805303 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 C861F13BF for ; Mon, 11 Feb 2019 09:18:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5427299D8 for ; Mon, 11 Feb 2019 09:18:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A41A129C54; Mon, 11 Feb 2019 09:18:22 +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 58F1E299D8 for ; Mon, 11 Feb 2019 09:18:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726308AbfBKJSV (ORCPT ); Mon, 11 Feb 2019 04:18:21 -0500 Received: from lb1-smtp-cloud9.xs4all.net ([194.109.24.22]:56785 "EHLO lb1-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbfBKJSV (ORCPT ); Mon, 11 Feb 2019 04:18:21 -0500 Received: from tschai.fritz.box ([212.251.195.8]) by smtp-cloud9.xs4all.net with ESMTPA id t7jEgrcjwRO5Zt7jHg2zBb; Mon, 11 Feb 2019 10:18:19 +0100 From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Dafna Hirschfeld , Paul Kocialkowski , Ezequiel Garcia Subject: [PATCH 0/3] vb2: add requires_requests bitfield Date: Mon, 11 Feb 2019 10:18:13 +0100 Message-Id: <20190211091816.33022-1-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CMAE-Envelope: MS4wfDT1aW5apAls7ohdba4iGqhxs2pHVmBPRRU01l4vcl8O+BgnaKVYkY73+wjqAUrtD0RwOCFugosN88EC/PbMfcGjtw3oINaTD1MauOZ5Z0YLuenXu939 4RwkofVX2bBa6oE6a11Ab31VqRAtHCo5fR/8wqErfGfD2jyV+FRxnCob6P8jlG0I7O8Y5tK/NCKzSAmIGKDSst/NC6mevV5hvaKBvdu9OjX03PQ5D1IlFqJG Z7/OHr7bCWbSEUwmdzkvZjp+a+EmRc7ssCoR41ynZXz6VRaDHT9k6nAmKxWZxpfk 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 Currently the supports_requests bitfield only indicates if the Request API is supported by the vb2_queue. But for stateless codecs the use of the Request API is actually a requirement. So add a requires_requests bitfield and corresponding capability to indicate that userspace has to use requests. And of course reject direct VIDIOC_QBUF calls (i.e. V4L2_BUF_FLAG_REQUEST_FD isn't set) if requires_requests is set. Finally set this bitfield in the cedrus driver. Regards, Hans Hans Verkuil (3): vb2: add requires_requests bit for stateless codecs videodev2.h: add V4L2_BUF_CAP_REQUIRES_REQUESTS cedrus: set requires_requests Documentation/media/uapi/v4l/vidioc-reqbufs.rst | 4 ++++ drivers/media/common/videobuf2/videobuf2-core.c | 5 ++++- drivers/media/common/videobuf2/videobuf2-v4l2.c | 6 ++++++ drivers/staging/media/sunxi/cedrus/cedrus_video.c | 1 + include/media/videobuf2-core.h | 3 +++ include/uapi/linux/videodev2.h | 1 + 6 files changed, 19 insertions(+), 1 deletion(-)