aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShunqian Zheng <zhengsq@rock-chips.com>2018-03-08 17:47:51 +0800
committerHelen Koike <helen.koike@collabora.com>2019-08-06 17:25:21 -0300
commite809e167230ce4af1fc2936868741a27ce89fd89 (patch)
treefb1ec5438f1dffede0551f12e8774e2a055de386
parent66e11480d7196c7656cb034b9221dc794c9df143 (diff)
media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format
Add the Rockchip ISP1 specific processing parameter format V4L2_META_FMT_RK_ISP1_PARAMS and metadata format V4L2_META_FMT_RK_ISP1_STAT_3A for 3A. Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com> Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> [update for upstream] Signed-off-by: Helen Koike <helen.koike@collabora.com> Series-to: linux-rockchip@lists.infradead.org Series-cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Series-cc: mchehab@kernel.org, linux-media@vger.kernel.org Series-cc: sakari.ailus@linux.intel.com, hans.verkuil@cisco.com Series-cc: tfiga@chromium.org, zhengsq@rock-chips.com Series-cc: laurent.pinchart@ideasonboard.com, zyc@rock-chips.com Series-cc: eddie.cai.linux@gmail.com, jeffy.chen@rock-chips.com Series-cc: devicetree@vger.kernel.org, heiko@sntech.de Series-cc: jacob2.chen@rock-chips.com Series-cc: kernel@collabora.com, ezequiel@collabora.com Series-version: 9 Series-changes: 7 - s/IPU3/RK_ISP1 Cover-letter: Rockchip ISP1 Driver Hello, I'm re-sending a new version of ISP(Camera) v4l2 driver for rockchip rk3399 SoC. I didn't change much from the last version, just applying the suggestions made in the previous one. This patchset is also available at: https://gitlab.collabora.com/koike/linux/tree/rockchip/isp/v8 Libcamera patched to work with this version: https://gitlab.collabora.com/koike/libcamera (also sent to the mailing list) I tested on the rockpi 4 with a rpi v1.3 sensor and also with the Scarlet Chromebook. Known issues (same as in v7): ------------- - Reloading the module doesn't work (there is some missing cleanup when unloading) - When capturing in bayer format, changing the size doesn't seem to affect the image. - crop needs more tests - v4l2-compliance error: fail: v4l2-test-controls.cpp(824): subscribe event for control 'Image Processing Controls' failed test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL It seems that if controls are supported, v4l2-compliance says that controls of type 'Image Processing Controls' are mandatory, is this correct? - It seems there are still some issues with interrupts, but I couldn't isolate them yet. Previous changelog: ------------------- changes in V6: - add mipi txrx phy support - remove bool and enum from uapi header - add buf_prepare op - correct some spelling problems - return all queued buffers when starting stream failed changes in V5: Sync with local changes, - fix the SP height limit - speed up the second stream capture - the second stream can't force sync for rsz when start/stop streaming - add frame id to param vb2 buf - enable luminance maximum threshold changes in V4: - fix some bugs during development - move quantization settings to rkisp1 subdev - correct some spelling problems - describe ports in dt-binding documents changes in V3: - add some comments - fix wrong use of v4l2_async_subdev_notifier_register - optimize two paths capture at a time - remove compose - re-struct headers - add a tmp wiki page: http://opensource.rock-chips.com/wiki_Rockchip-isp1 changes in V2: mipi-phy: - use async probing - make it be a child device of the GRF isp: - add dummy buffer - change the way to get bus configuration, which make it possible to add parallel sensor support in the future(without mipi-phy driver). ------------------ END
-rw-r--r--drivers/media/v4l2-core/v4l2-ioctl.c2
-rw-r--r--include/uapi/linux/videodev2.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index bb5b4926538a..2df20801a299 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1330,6 +1330,8 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
case V4L2_META_FMT_VSP1_HGT: descr = "R-Car VSP1 2-D Histogram"; break;
case V4L2_META_FMT_UVC: descr = "UVC Payload Header Metadata"; break;
case V4L2_META_FMT_D4XX: descr = "Intel D4xx UVC Metadata"; break;
+ case V4L2_META_FMT_RK_ISP1_PARAMS: descr = "Rockchip ISP1 3A params"; break;
+ case V4L2_META_FMT_RK_ISP1_STAT_3A: descr = "Rockchip ISP1 3A statistics"; break;
default:
/* Compressed formats */
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 2427bc4d8eba..ae1e375a10d7 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -756,6 +756,10 @@ struct v4l2_pix_format {
#define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */
#define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */
+/* Vendor specific - used for RK_ISP1 camera sub-system */
+#define V4L2_META_FMT_RK_ISP1_PARAMS v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 params */
+#define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A statistics */
+
/* priv field value to indicates that subsequent fields are valid. */
#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe