Linux-mediatek Archive on
 help / color / Atom feed
From: Yunfei Dong <>
To: Hans Verkuil <>,
	Tiffany Lin <>,
	 Rob Herring <>
Cc: Mark Rutland <>,,
	Alexandre Courbot <>,
	Yunfei Dong <>,, Tomasz Figa <>,,
	Matthias Brugger <>,
	Mauro Carvalho Chehab <>,,
Subject: [PATCH v3, 0/2] This patchset add read-only(Ro) request for capture queue
Date: Wed, 1 Jul 2020 17:35:20 +0800
Message-ID: <> (raw)


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.

There is no 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.


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.

Add param ro_requests in struct v4l2_ctrl_handler mean that all CID ctrls
belong to this ctrl handler is read only. Add param ro_ctrl_handler in
struct v4l2_fh used for Ro request.

Add param supports_ro_requests in struct vb2_queue present that capture or
output queue use Ro request.

When set/get ext ctrls, will check whether current CID ctrls is ro ctrls
or not using function v4l2_check_ro_ext_ctrls().

Changes in v3
-change cover-letter message
-change commit message for patch 02/02
-add sanity check in vb2_core_queue_init()

Yunfei Dong (2):
  media: v4l: Add Ro request api for capture queue

 .../media/v4l/vidioc-reqbufs.rst              |   4 +
 .../media/common/videobuf2/videobuf2-core.c   |   3 +
 .../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 +
 11 files changed, 161 insertions(+), 38 deletions(-)

Linux-mediatek mailing list

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  9:35 Yunfei Dong [this message]
2020-07-01  9:35 ` [PATCH v3, 1/2] media: v4l UAPI: add V4L2_BUF_CAP_SUPPORTS_RO_REQUESTS Yunfei Dong
2020-07-01  9:35 ` [PATCH v3,2/2] media: v4l: Add Ro request api for capture queue Yunfei Dong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mediatek Archive on

Archives are clonable:
	git clone --mirror linux-mediatek/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mediatek linux-mediatek/ \
	public-inbox-index linux-mediatek

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone