From 00baf48dcdb76c94d12ec2457b608e17f2a9f1ac Mon Sep 17 00:00:00 2001 From: Bhanu Murthy V Date: Wed, 31 Oct 2018 20:00:26 -0700 Subject: drivers: camera: Support sensor blobs in controls Add mode and control blobs for sensor safety architecture. Add support for tvcf to expose control context apis to prepare control blobs. Bug 2433156 Change-Id: If2ada23eb52f7b55545db8cd1d4bf29efc333af1 Signed-off-by: Bhanu Murthy V Reviewed-on: https://git-master.nvidia.com/r/1941463 (cherry picked from commit cc9b60122046565200fb42c1159d612764d1bca8) Reviewed-on: https://git-master.nvidia.com/r/2006763 Reviewed-by: svc-mobile-coverity Tested-by: Ian Kaszubski Reviewed-by: Vincent Chung GVS: Gerrit_Virtual_Submit Reviewed-by: Frank Chen Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/media/camera_common.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include/media') diff --git a/include/media/camera_common.h b/include/media/camera_common.h index be8f41b15..a6a523837 100644 --- a/include/media/camera_common.h +++ b/include/media/camera_common.h @@ -179,24 +179,38 @@ struct camera_common_sensor_ops { int (*stop_streaming)(struct tegracam_device *tc_dev); }; +struct tegracam_sensor_data { + struct sensor_blob mode_blob; + struct sensor_blob ctrls_blob; +}; struct tegracam_ctrl_ops { u32 numctrls; u32 string_ctrl_size[TEGRA_CAM_MAX_STRING_CONTROLS]; const u32 *ctrl_cid_list; + bool is_blob_supported; int (*set_gain)(struct tegracam_device *tc_dev, s64 val); int (*set_exposure)(struct tegracam_device *tc_dev, s64 val); int (*set_exposure_short)(struct tegracam_device *tc_dev, s64 val); int (*set_frame_rate)(struct tegracam_device *tc_dev, s64 val); int (*set_group_hold)(struct tegracam_device *tc_dev, bool val); int (*fill_string_ctrl)(struct tegracam_device *tc_dev, - struct v4l2_ctrl *ctrl); + struct v4l2_ctrl *ctrl); + int (*set_gain_ex)(struct tegracam_device *tc_dev, + struct sensor_blob *blob, s64 val); + int (*set_exposure_ex)(struct tegracam_device *tc_dev, + struct sensor_blob *blob, s64 val); + int (*set_frame_rate_ex)(struct tegracam_device *tc_dev, + struct sensor_blob *blob, s64 val); + int (*set_group_hold_ex)(struct tegracam_device *tc_dev, + struct sensor_blob *blob, bool val); }; struct tegracam_ctrl_handler { struct v4l2_ctrl_handler ctrl_handler; const struct tegracam_ctrl_ops *ctrl_ops; struct tegracam_device *tc_dev; + struct tegracam_sensor_data sensor_data; int numctrls; struct v4l2_ctrl *ctrls[MAX_CID_CONTROLS]; -- cgit v1.2.2