diff options
| author | Bhanu Murthy V <bmurthyv@nvidia.com> | 2018-10-31 23:00:26 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-02-01 02:28:02 -0500 |
| commit | 00baf48dcdb76c94d12ec2457b608e17f2a9f1ac (patch) | |
| tree | 01a563768b8e247a70ecbf7e5aacc32f74731873 /include/media | |
| parent | d67df23b0aa8740daee98386b6fe09ce0afc4ea5 (diff) | |
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 <bmurthyv@nvidia.com>
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 <svc-mobile-coverity@nvidia.com>
Tested-by: Ian Kaszubski <ikaszubski@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/media')
| -rw-r--r-- | include/media/camera_common.h | 16 |
1 files changed, 15 insertions, 1 deletions
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 { | |||
| 179 | int (*stop_streaming)(struct tegracam_device *tc_dev); | 179 | int (*stop_streaming)(struct tegracam_device *tc_dev); |
| 180 | }; | 180 | }; |
| 181 | 181 | ||
| 182 | struct tegracam_sensor_data { | ||
| 183 | struct sensor_blob mode_blob; | ||
| 184 | struct sensor_blob ctrls_blob; | ||
| 185 | }; | ||
| 182 | 186 | ||
| 183 | struct tegracam_ctrl_ops { | 187 | struct tegracam_ctrl_ops { |
| 184 | u32 numctrls; | 188 | u32 numctrls; |
| 185 | u32 string_ctrl_size[TEGRA_CAM_MAX_STRING_CONTROLS]; | 189 | u32 string_ctrl_size[TEGRA_CAM_MAX_STRING_CONTROLS]; |
| 186 | const u32 *ctrl_cid_list; | 190 | const u32 *ctrl_cid_list; |
| 191 | bool is_blob_supported; | ||
| 187 | int (*set_gain)(struct tegracam_device *tc_dev, s64 val); | 192 | int (*set_gain)(struct tegracam_device *tc_dev, s64 val); |
| 188 | int (*set_exposure)(struct tegracam_device *tc_dev, s64 val); | 193 | int (*set_exposure)(struct tegracam_device *tc_dev, s64 val); |
| 189 | int (*set_exposure_short)(struct tegracam_device *tc_dev, s64 val); | 194 | int (*set_exposure_short)(struct tegracam_device *tc_dev, s64 val); |
| 190 | int (*set_frame_rate)(struct tegracam_device *tc_dev, s64 val); | 195 | int (*set_frame_rate)(struct tegracam_device *tc_dev, s64 val); |
| 191 | int (*set_group_hold)(struct tegracam_device *tc_dev, bool val); | 196 | int (*set_group_hold)(struct tegracam_device *tc_dev, bool val); |
| 192 | int (*fill_string_ctrl)(struct tegracam_device *tc_dev, | 197 | int (*fill_string_ctrl)(struct tegracam_device *tc_dev, |
| 193 | struct v4l2_ctrl *ctrl); | 198 | struct v4l2_ctrl *ctrl); |
| 199 | int (*set_gain_ex)(struct tegracam_device *tc_dev, | ||
| 200 | struct sensor_blob *blob, s64 val); | ||
| 201 | int (*set_exposure_ex)(struct tegracam_device *tc_dev, | ||
| 202 | struct sensor_blob *blob, s64 val); | ||
| 203 | int (*set_frame_rate_ex)(struct tegracam_device *tc_dev, | ||
| 204 | struct sensor_blob *blob, s64 val); | ||
| 205 | int (*set_group_hold_ex)(struct tegracam_device *tc_dev, | ||
| 206 | struct sensor_blob *blob, bool val); | ||
| 194 | }; | 207 | }; |
| 195 | 208 | ||
| 196 | struct tegracam_ctrl_handler { | 209 | struct tegracam_ctrl_handler { |
| 197 | struct v4l2_ctrl_handler ctrl_handler; | 210 | struct v4l2_ctrl_handler ctrl_handler; |
| 198 | const struct tegracam_ctrl_ops *ctrl_ops; | 211 | const struct tegracam_ctrl_ops *ctrl_ops; |
| 199 | struct tegracam_device *tc_dev; | 212 | struct tegracam_device *tc_dev; |
| 213 | struct tegracam_sensor_data sensor_data; | ||
| 200 | 214 | ||
| 201 | int numctrls; | 215 | int numctrls; |
| 202 | struct v4l2_ctrl *ctrls[MAX_CID_CONTROLS]; | 216 | struct v4l2_ctrl *ctrls[MAX_CID_CONTROLS]; |
