From patchwork Mon Jun 22 01:52:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunfei Dong X-Patchwork-Id: 11617883 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0BC7013A0 for ; Mon, 22 Jun 2020 14:04:59 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D8153206E2 for ; Mon, 22 Jun 2020 14:04:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Alu6Re19"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="PF3ssBFs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8153206E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=mfOuv7cUTQHhsihhQ5UssecnGuQ1m+A1bPe3hkvduss=; b=Alu6Re19ZamFM6RDxVZRoNIl5h sbL2ZY93SADlVZGDZ0Wwb1RvHmg6NJ7WyPdP2JFPiGGxDaqDMNz3uSR2Scj/rTWkHITlY5E9Pvk02 j2sBQfHUsCi8YhxX5EhVHZBivm3DbmOcyNF4bpnVKyR83lWtGqJHdMX3Zbgz3HnCsonRds8d7vtru 9DuA1oPvW1QC5aMJyphfiiy8KiZOccjOYg/Tvp/9UUJLVK8ebXjB1l4iVbuJirEtg+kCkszT6YIeE VUYzVNsAlIPfdxL8Sp46obSQJKms2BHzsVYGAud9GBvE5aI0FrH6rjZXs0r1uhVHHLshQy8lqWvPE RMGe8JWQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnN4A-0007gg-Q0; Mon, 22 Jun 2020 14:04:54 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnBgM-0005hA-9O; Mon, 22 Jun 2020 01:55:35 +0000 X-UUID: 36c252ba239e4ebabe71bc752ed95b83-20200621 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=zL0uYKUIajVcrjQR0y8N+YBuHqN7Cv7VTQvEPua1Nww=; b=PF3ssBFshqvLiWGzYDfy+YX0ciFpXzJikVGjEm67D1g0NW14n9fRfj+xK01fRdPe6TzjsuXBr2rurGu+/kz0A+julNWLlNehzX9h244J7FzRn0LveNNeR+XnHNt3n+rMTD+2ctFHkklJz+yUQNQvqpcKi/zjhV12QV5fMRbmxgU=; X-UUID: 36c252ba239e4ebabe71bc752ed95b83-20200621 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 886020634; Sun, 21 Jun 2020 17:55:17 -0800 Received: from mtkmbs08n2.mediatek.inc (172.21.101.56) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 21 Jun 2020 18:55:07 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 22 Jun 2020 09:55:12 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 22 Jun 2020 09:55:02 +0800 From: Yunfei Dong To: Hans Verkuil , Tiffany Lin , Rob Herring Subject: [PATCH v2, 0/2] This patchset add Read-only(Ro) request for capture queue Date: Mon, 22 Jun 2020 09:52:25 +0800 Message-ID: <20200622015227.24134-1-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-SNTS-SMTP: BC319FA8B0CE42E63876C40656E541A7BC49AED5DE905F57669A587BB0ADF5292000:8 X-MTK: N X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Yunfei Dong , linux-kernel@vger.kernel.org, Tomasz Figa , linux-mediatek@lists.infradead.org, Matthias Brugger , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org User driver need to get HDR10+ information for each capture buffer; For some encoder cases, user driver need to get encoded message for each frame. So add support read-only(Ro) request for capture queue. Ro request mean that user driver just can get ext ctrls, set ext ctrls is not not allowed. Ro Request also can be used in output queue. There is not upstream driver to use this feature at now, but we are developing internal driver to use it. If it is ready, we will try to upstream vdec/venc driver based on this feature. Change compared to v1: -change commit message of patch 01/02 -change commit message of patch 02/02 Yunfei Dong (2): media: v4l UAPI: add V4L2_BUF_CAP_SUPPORTS_RO_REQUESTS media: v4l: Add Ro request api for capture queue .../media/v4l/vidioc-reqbufs.rst | 4 + .../media/common/videobuf2/videobuf2-v4l2.c | 7 ++ drivers/media/mc/mc-request.c | 10 +- drivers/media/v4l2-core/v4l2-ctrls.c | 107 +++++++++++++++--- drivers/media/v4l2-core/v4l2-ioctl.c | 22 ++++ drivers/media/v4l2-core/v4l2-mem2mem.c | 19 ++-- include/media/v4l2-ctrls.h | 22 +++- include/media/v4l2-fh.h | 2 + include/media/videobuf2-core.h | 2 + include/uapi/linux/videodev2.h | 1 + 10 files changed, 158 insertions(+), 38 deletions(-)