Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1346311

[PATCH v3 1/3] [NOT FOR REVIEW] v4l: Add private compound control type.

From Jung Zhao <jung.zhao@rock-chips.com>
Newsgroups linux.kernel
Subject [PATCH v3 1/3] [NOT FOR REVIEW] v4l: Add private compound control type.
Date 2016-03-01 03:40 +0100
Message-ID <r7Ioa-2Vu-11@gated-at.bofh.it> (permalink)
References <r7Io9-2Vu-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Pawel Osciak <posciak@chromium.org>

V4L2_CTRL_TYPE_PRIVATE is to be used for private driver compound
controls that use the "ptr" member of struct v4l2_ext_control.

Signed-off-by: Pawel Osciak <posciak@chromium.org>
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
---
Changes in v3: None
Changes in v2:
- add [NOT FOR REVIEW] tag for patches from Chromium OS Tree suggested by Tomasz
- update copyright message
- list all the related signed-off names
- add more description suggested by Enric
- fix format error of commit message suggested by Tomasz

 drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++++
 include/uapi/linux/videodev2.h       | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 890520d..527d65c 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -1525,6 +1525,10 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx,
 			return -ERANGE;
 		return 0;
 
+	/* FIXME:just return 0 for now */
+	case V4L2_CTRL_TYPE_PRIVATE:
+		return 0;
+
 	default:
 		return -EINVAL;
 	}
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 29a6b78..53ac896 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1517,6 +1517,8 @@ enum v4l2_ctrl_type {
 	V4L2_CTRL_TYPE_U8	     = 0x0100,
 	V4L2_CTRL_TYPE_U16	     = 0x0101,
 	V4L2_CTRL_TYPE_U32	     = 0x0102,
+
+	V4L2_CTRL_TYPE_PRIVATE       = 0xffff,
 };
 
 /*  Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/3] Add Rockchip VP8 Video Decoder Driver Jung Zhao <jung.zhao@rock-chips.com> - 2016-03-01 03:40 +0100
  [PATCH v3 1/3] [NOT FOR REVIEW] v4l: Add private compound control type. Jung Zhao <jung.zhao@rock-chips.com> - 2016-03-01 03:40 +0100
  [PATCH v3 2/3] [NOT FOR REVIEW] v4l: Add VP8 low-level decoder API controls. Jung Zhao <jung.zhao@rock-chips.com> - 2016-03-01 03:40 +0100
    Re: [PATCH v3 2/3] [NOT FOR REVIEW] v4l: Add VP8 low-level decoder  API controls. kbuild test robot <lkp@intel.com> - 2016-03-01 03:50 +0100

csiph-web