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: 11616825 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 C92B2913 for ; Mon, 22 Jun 2020 01:55:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A5C31246BD for ; Mon, 22 Jun 2020 01:55:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="PF3ssBFs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726973AbgFVBzX (ORCPT ); Sun, 21 Jun 2020 21:55:23 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:7073 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726910AbgFVBzW (ORCPT ); Sun, 21 Jun 2020 21:55:22 -0400 X-UUID: 3756c7acd69a42a0bbb74e0191321fb0-20200622 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: 3756c7acd69a42a0bbb74e0191321fb0-20200622 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 792369175; Mon, 22 Jun 2020 09:55:16 +0800 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 CC: Yunfei Dong , Mauro Carvalho Chehab , Mark Rutland , Matthias Brugger , , , , , , Tomasz Figa 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 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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(-)