Alok Pandey | 3473bcf | 2018-01-05 14:47:19 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2018, The Linux Foundation. All rights reserved. |
Lakshmi Narayana Kalavala | 85c4035 | 2017-05-15 16:19:13 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef _CAM_HFI_SESSION_DEFS_H |
| 14 | #define _CAM_HFI_SESSION_DEFS_H |
| 15 | |
| 16 | #include <linux/types.h> |
| 17 | |
| 18 | #define HFI_IPEBPS_CMD_OPCODE_BPS_CONFIG_IO 0x1 |
| 19 | #define HFI_IPEBPS_CMD_OPCODE_BPS_FRAME_PROCESS 0x2 |
| 20 | #define HFI_IPEBPS_CMD_OPCODE_BPS_ABORT 0x3 |
| 21 | #define HFI_IPEBPS_CMD_OPCODE_BPS_DESTROY 0x4 |
| 22 | |
| 23 | #define HFI_IPEBPS_CMD_OPCODE_IPE_CONFIG_IO 0x5 |
| 24 | #define HFI_IPEBPS_CMD_OPCODE_IPE_FRAME_PROCESS 0x6 |
| 25 | #define HFI_IPEBPS_CMD_OPCODE_IPE_ABORT 0x7 |
| 26 | #define HFI_IPEBPS_CMD_OPCODE_IPE_DESTROY 0x8 |
| 27 | |
| 28 | #define HFI_IPEBPS_CMD_OPCODE_BPS_WAIT_FOR_IPE 0x9 |
| 29 | #define HFI_IPEBPS_CMD_OPCODE_BPS_WAIT_FOR_BPS 0xa |
| 30 | #define HFI_IPEBPS_CMD_OPCODE_IPE_WAIT_FOR_BPS 0xb |
| 31 | #define HFI_IPEBPS_CMD_OPCODE_IPE_WAIT_FOR_IPE 0xc |
| 32 | |
| 33 | #define HFI_IPEBPS_HANDLE_TYPE_BPS 0x1 |
| 34 | #define HFI_IPEBPS_HANDLE_TYPE_IPE_RT 0x2 |
| 35 | #define HFI_IPEBPS_HANDLE_TYPE_IPE_NON_RT 0x3 |
| 36 | |
| 37 | /** |
| 38 | * struct hfi_cmd_abort_destroy |
| 39 | * @user_data: user supplied data |
| 40 | * |
| 41 | * IPE/BPS destroy/abort command |
| 42 | * @HFI_IPEBPS_CMD_OPCODE_IPE_ABORT |
| 43 | * @HFI_IPEBPS_CMD_OPCODE_BPS_ABORT |
| 44 | * @HFI_IPEBPS_CMD_OPCODE_IPE_DESTROY |
| 45 | * @HFI_IPEBPS_CMD_OPCODE_BPS_DESTROY |
| 46 | */ |
| 47 | struct hfi_cmd_abort_destroy { |
| 48 | uint64_t user_data; |
| 49 | } __packed; |
| 50 | |
| 51 | /** |
| 52 | * struct hfi_cmd_chaining_ops |
| 53 | * @wait_hdl: current session handle waits on wait_hdl to complete operation |
| 54 | * @user_data: user supplied argument |
| 55 | * |
| 56 | * this structure for chaining opcodes |
| 57 | * BPS_WAITS_FOR_IPE |
| 58 | * BPS_WAITS_FOR_BPS |
| 59 | * IPE_WAITS_FOR_BPS |
| 60 | * IPE_WAITS_FOR_IPE |
| 61 | */ |
| 62 | struct hfi_cmd_chaining_ops { |
| 63 | uint32_t wait_hdl; |
| 64 | uint64_t user_data; |
| 65 | } __packed; |
| 66 | |
| 67 | /** |
| 68 | * struct hfi_cmd_create_handle |
| 69 | * @size: packet size in bytes |
| 70 | * @pkt_type: opcode of a packet |
| 71 | * @handle_type: IPE/BPS firmware session handle type |
| 72 | * @user_data1: caller provided data1 |
| 73 | * @user_data2: caller provided data2 |
| 74 | * |
| 75 | * create firmware session handle |
| 76 | */ |
| 77 | struct hfi_cmd_create_handle { |
| 78 | uint32_t size; |
| 79 | uint32_t pkt_type; |
| 80 | uint32_t handle_type; |
| 81 | uint64_t user_data1; |
| 82 | uint64_t user_data2; |
| 83 | } __packed; |
| 84 | |
| 85 | /** |
| 86 | * struct hfi_cmd_ipebps_async |
| 87 | * @size: packet size in bytes |
| 88 | * @pkt_type: opcode of a packet |
| 89 | * @opcode: opcode for IPE/BPS async operation |
| 90 | * CONFIG_IO: configures I/O for IPE/BPS handle |
| 91 | * FRAME_PROCESS: image frame to be processed by IPE/BPS |
| 92 | * ABORT: abort all processing frames of IPE/BPS handle |
| 93 | * DESTROY: destroy earlier created IPE/BPS handle |
| 94 | * BPS_WAITS_FOR_IPE: sync for BPS to wait for IPE |
| 95 | * BPS_WAITS_FOR_BPS: sync for BPS to wait for BPS |
| 96 | * IPE_WAITS_FOR_IPE: sync for IPE to wait for IPE |
| 97 | * IPE_WAITS_FOR_BPS: sync for IPE to wait for BPS |
| 98 | * @num_fw_handles: number of IPE/BPS firmware handles in fw_handles array |
| 99 | * @fw_handles: IPE/BPS handles array |
| 100 | * @payload: command payload for IPE/BPS opcodes |
| 101 | * @direct: points to actual payload |
| 102 | * @indirect: points to address of payload |
| 103 | * |
| 104 | * sends async command to the earlier created IPE or BPS handle |
| 105 | * for asynchronous operation. |
| 106 | */ |
| 107 | struct hfi_cmd_ipebps_async { |
| 108 | uint32_t size; |
| 109 | uint32_t pkt_type; |
| 110 | uint32_t opcode; |
| 111 | uint64_t user_data1; |
| 112 | uint64_t user_data2; |
| 113 | uint32_t num_fw_handles; |
| 114 | uint32_t fw_handles[1]; |
| 115 | union { |
| 116 | uint32_t direct[1]; |
| 117 | uint32_t indirect; |
| 118 | } payload; |
| 119 | } __packed; |
| 120 | |
| 121 | /** |
| 122 | * struct hfi_msg_create_handle_ack |
| 123 | * @size: packet size in bytes |
| 124 | * @pkt_type: opcode of a packet |
| 125 | * @err_type: error code |
| 126 | * @fw_handle: output param for IPE/BPS handle |
| 127 | * @user_data1: user provided data1 |
| 128 | * @user_data2: user provided data2 |
| 129 | * |
| 130 | * ack for create handle command of IPE/BPS |
| 131 | * @HFI_MSG_IPEBPS_CREATE_HANDLE_ACK |
| 132 | */ |
| 133 | struct hfi_msg_create_handle_ack { |
| 134 | uint32_t size; |
| 135 | uint32_t pkt_type; |
| 136 | uint32_t err_type; |
| 137 | uint32_t fw_handle; |
| 138 | uint64_t user_data1; |
| 139 | uint64_t user_data2; |
| 140 | } __packed; |
| 141 | |
| 142 | /** |
| 143 | * struct hfi_msg_ipebps_async |
| 144 | * @size: packet size in bytes |
| 145 | * @pkt_type: opcode of a packet |
| 146 | * @opcode: opcode of IPE/BPS async operation |
| 147 | * @user_data1: user provided data1 |
| 148 | * @user_data2: user provided data2 |
| 149 | * @err_type: error code |
| 150 | * @msg_data: IPE/BPS async done message data |
| 151 | * |
| 152 | * result of IPE/BPS async command |
| 153 | * @HFI_MSG_IPEBPS_ASYNC_COMMAND_ACK |
| 154 | */ |
| 155 | struct hfi_msg_ipebps_async_ack { |
| 156 | uint32_t size; |
| 157 | uint32_t pkt_type; |
| 158 | uint32_t opcode; |
| 159 | uint64_t user_data1; |
| 160 | uint64_t user_data2; |
| 161 | uint32_t err_type; |
| 162 | uint32_t msg_data[1]; |
| 163 | } __packed; |
| 164 | |
| 165 | /** |
| 166 | * struct hfi_msg_frame_process_done |
| 167 | * @result: result of frame process command |
| 168 | * @scratch_buffer_address: address of scratch buffer |
| 169 | */ |
| 170 | struct hfi_msg_frame_process_done { |
| 171 | uint32_t result; |
| 172 | uint32_t scratch_buffer_address; |
| 173 | }; |
| 174 | |
| 175 | /** |
| 176 | * struct hfi_msg_chaining_op |
| 177 | * @status: return status |
| 178 | * @user_data: user data provided as part of chaining ops |
| 179 | * |
| 180 | * IPE/BPS wait response |
| 181 | */ |
| 182 | struct hfi_msg_chaining_op { |
| 183 | uint32_t status; |
| 184 | uint64_t user_data; |
| 185 | } __packed; |
| 186 | |
| 187 | /** |
| 188 | * struct hfi_msg_abort_destroy |
| 189 | * @status: return status |
| 190 | * @user_data: user data provided as part of abort/destroy ops |
| 191 | * |
| 192 | * IPE/BPS abort/destroy response |
| 193 | */ |
| 194 | struct hfi_msg_abort_destroy { |
| 195 | uint32_t status; |
| 196 | uint64_t user_data; |
| 197 | } __packed; |
| 198 | |
| 199 | #define MAX_NUM_OF_IMAGE_PLANES 2 |
Karthik Anantha Ram | 599c4e15 | 2017-12-14 15:03:48 -0800 | [diff] [blame] | 200 | #define MAX_HFR_GROUP 16 |
Lakshmi Narayana Kalavala | 85c4035 | 2017-05-15 16:19:13 -0700 | [diff] [blame] | 201 | |
| 202 | enum hfi_ipe_io_images { |
| 203 | IPE_INPUT_IMAGE_FULL, |
| 204 | IPE_INPUT_IMAGE_DS4, |
| 205 | IPE_INPUT_IMAGE_DS16, |
| 206 | IPE_INPUT_IMAGE_DS64, |
| 207 | IPE_INPUT_IMAGE_FULL_REF, |
| 208 | IPE_INPUT_IMAGE_DS4_REF, |
| 209 | IPE_INPUT_IMAGE_DS16_REF, |
| 210 | IPE_INPUT_IMAGE_DS64_REF, |
| 211 | IPE_OUTPUT_IMAGE_DISPLAY, |
| 212 | IPE_OUTPUT_IMAGE_VIDEO, |
| 213 | IPE_OUTPUT_IMAGE_FULL_REF, |
| 214 | IPE_OUTPUT_IMAGE_DS4_REF, |
| 215 | IPE_OUTPUT_IMAGE_DS16_REF, |
| 216 | IPE_OUTPUT_IMAGE_DS64_REF, |
| 217 | IPE_INPUT_IMAGE_FIRST = IPE_INPUT_IMAGE_FULL, |
| 218 | IPE_INPUT_IMAGE_LAST = IPE_INPUT_IMAGE_DS64_REF, |
| 219 | IPE_OUTPUT_IMAGE_FIRST = IPE_OUTPUT_IMAGE_DISPLAY, |
| 220 | IPE_OUTPUT_IMAGE_LAST = IPE_OUTPUT_IMAGE_DS64_REF, |
| 221 | IPE_IO_IMAGES_MAX |
| 222 | }; |
| 223 | |
Karthik Anantha Ram | 599c4e15 | 2017-12-14 15:03:48 -0800 | [diff] [blame] | 224 | enum bps_io_images { |
| 225 | BPS_INPUT_IMAGE, |
| 226 | BPS_OUTPUT_IMAGE_FULL, |
| 227 | BPS_OUTPUT_IMAGE_DS4, |
| 228 | BPS_OUTPUT_IMAGE_DS16, |
| 229 | BPS_OUTPUT_IMAGE_DS64, |
| 230 | BPS_OUTPUT_IMAGE_STATS_BG, |
| 231 | BPS_OUTPUT_IMAGE_STATS_BHIST, |
| 232 | BPS_OUTPUT_IMAGE_REG1, |
| 233 | BPS_OUTPUT_IMAGE_REG2, |
| 234 | BPS_OUTPUT_IMAGE_FIRST = BPS_OUTPUT_IMAGE_FULL, |
| 235 | BPS_OUTPUT_IMAGE_LAST = BPS_OUTPUT_IMAGE_REG2, |
| 236 | BPS_IO_IMAGES_MAX |
| 237 | }; |
| 238 | |
| 239 | struct frame_buffer { |
| 240 | uint32_t buffer_ptr[MAX_NUM_OF_IMAGE_PLANES]; |
| 241 | uint32_t meta_buffer_ptr[MAX_NUM_OF_IMAGE_PLANES]; |
| 242 | } __packed; |
| 243 | |
| 244 | struct bps_frame_process_data { |
| 245 | struct frame_buffer buffers[BPS_IO_IMAGES_MAX]; |
| 246 | uint32_t max_num_cores; |
| 247 | uint32_t target_time; |
| 248 | uint32_t ubwc_stats_buffer_addr; |
| 249 | uint32_t ubwc_stats_buffer_size; |
| 250 | uint32_t cdm_buffer_addr; |
| 251 | uint32_t cdm_buffer_size; |
| 252 | uint32_t iq_settings_addr; |
| 253 | uint32_t strip_lib_out_addr; |
| 254 | uint32_t cdm_prog_addr; |
Alok Pandey | 3473bcf | 2018-01-05 14:47:19 +0530 | [diff] [blame] | 255 | uint32_t request_id; |
Karthik Anantha Ram | 599c4e15 | 2017-12-14 15:03:48 -0800 | [diff] [blame] | 256 | }; |
| 257 | |
Lakshmi Narayana Kalavala | 85c4035 | 2017-05-15 16:19:13 -0700 | [diff] [blame] | 258 | enum hfi_ipe_image_format { |
| 259 | IMAGE_FORMAT_INVALID, |
| 260 | IMAGE_FORMAT_MIPI_8, |
| 261 | IMAGE_FORMAT_MIPI_10, |
| 262 | IMAGE_FORMAT_MIPI_12, |
| 263 | IMAGE_FORMAT_MIPI_14, |
| 264 | IMAGE_FORMAT_BAYER_8, |
| 265 | IMAGE_FORMAT_BAYER_10, |
| 266 | IMAGE_FORMAT_BAYER_12, |
| 267 | IMAGE_FORMAT_BAYER_14, |
| 268 | IMAGE_FORMAT_PDI_10, |
| 269 | IMAGE_FORMAT_PD_10, |
| 270 | IMAGE_FORMAT_PD_8, |
| 271 | IMAGE_FORMAT_INDICATIONS, |
| 272 | IMAGE_FORMAT_REFINEMENT, |
| 273 | IMAGE_FORMAT_UBWC_TP_10, |
| 274 | IMAGE_FORMAT_UBWC_NV_12, |
| 275 | IMAGE_FORMAT_UBWC_NV12_4R, |
| 276 | IMAGE_FORMAT_UBWC_P010, |
| 277 | IMAGE_FORMAT_LINEAR_TP_10, |
| 278 | IMAGE_FORMAT_LINEAR_P010, |
| 279 | IMAGE_FORMAT_LINEAR_NV12, |
| 280 | IMAGE_FORMAT_LINEAR_PLAIN_16, |
| 281 | IMAGE_FORMAT_YUV422_8, |
| 282 | IMAGE_FORMAT_YUV422_10, |
| 283 | IMAGE_FORMAT_STATISTICS_BAYER_GRID, |
| 284 | IMAGE_FORMAT_STATISTICS_BAYER_HISTOGRAM, |
| 285 | IMAGE_FORMAT_MAX |
| 286 | }; |
| 287 | |
| 288 | enum hfi_ipe_plane_format { |
| 289 | PLANE_FORMAT_INVALID = 0, |
| 290 | PLANE_FORMAT_MIPI_8, |
| 291 | PLANE_FORMAT_MIPI_10, |
| 292 | PLANE_FORMAT_MIPI_12, |
| 293 | PLANE_FORMAT_MIPI_14, |
| 294 | PLANE_FORMAT_BAYER_8, |
| 295 | PLANE_FORMAT_BAYER_10, |
| 296 | PLANE_FORMAT_BAYER_12, |
| 297 | PLANE_FORMAT_BAYER_14, |
| 298 | PLANE_FORMAT_PDI_10, |
| 299 | PLANE_FORMAT_PD_10, |
| 300 | PLANE_FORMAT_PD_8, |
| 301 | PLANE_FORMAT_INDICATIONS, |
| 302 | PLANE_FORMAT_REFINEMENT, |
| 303 | PLANE_FORMAT_UBWC_TP_10_Y, |
| 304 | PLANE_FORMAT_UBWC_TP_10_C, |
| 305 | PLANE_FORMAT_UBWC_NV_12_Y, |
| 306 | PLANE_FORMAT_UBWC_NV_12_C, |
| 307 | PLANE_FORMAT_UBWC_NV_12_4R_Y, |
| 308 | PLANE_FORMAT_UBWC_NV_12_4R_C, |
| 309 | PLANE_FORMAT_UBWC_P010_Y, |
| 310 | PLANE_FORMAT_UBWC_P010_C, |
| 311 | PLANE_FORMAT_LINEAR_TP_10_Y, |
| 312 | PLANE_FORMAT_LINEAR_TP_10_C, |
| 313 | PLANE_FORMAT_LINEAR_P010_Y, |
| 314 | PLANE_FORMAT_LINEAR_P010_C, |
| 315 | PLANE_FORMAT_LINEAR_NV12_Y, |
| 316 | PLANE_FORMAT_LINEAR_NV12_C, |
| 317 | PLANE_FORMAT_LINEAR_PLAIN_16_Y, |
| 318 | PLANE_FORMAT_LINEAR_PLAIN_16_C, |
| 319 | PLANE_FORMAT_YUV422_8, |
| 320 | PLANE_FORMAT_YUV422_10, |
| 321 | PLANE_FORMAT_STATISTICS_BAYER_GRID, |
| 322 | PLANE_FORMAT_STATISTICS_BAYER_HISTOGRAM, |
| 323 | PLANE_FORMAT_MAX |
| 324 | }; |
| 325 | |
| 326 | enum hfi_ipe_bayer_pixel_order { |
| 327 | FIRST_PIXEL_R, |
| 328 | FIRST_PIXEL_GR, |
| 329 | FIRST_PIXEL_B, |
| 330 | FIRST_PIXEL_GB, |
| 331 | FIRST_PIXEL_MAX |
| 332 | }; |
| 333 | |
| 334 | enum hfi_ipe_pixel_pack_alignment { |
| 335 | PIXEL_LSB_ALIGNED, |
| 336 | PIXEL_MSB_ALIGNED, |
| 337 | }; |
| 338 | |
| 339 | enum hfi_ipe_yuv_422_order { |
| 340 | PIXEL_ORDER_Y_U_Y_V, |
| 341 | PIXEL_ORDER_Y_V_Y_U, |
| 342 | PIXEL_ORDER_U_Y_V_Y, |
| 343 | PIXEL_ORDER_V_Y_U_Y, |
| 344 | PIXEL_ORDER_YUV422_MAX |
| 345 | }; |
| 346 | |
| 347 | enum ubwc_write_client { |
| 348 | IPE_WR_CLIENT_0 = 0, |
| 349 | IPE_WR_CLIENT_1, |
| 350 | IPE_WR_CLIENT_5, |
| 351 | IPE_WR_CLIENT_6, |
| 352 | IPE_WR_CLIENT_7, |
| 353 | IPE_WR_CLIENT_8, |
| 354 | IPE_WR_CLIENT_MAX |
| 355 | }; |
| 356 | |
| 357 | /** |
| 358 | * struct image_info |
| 359 | * @format: image format |
| 360 | * @img_width: image width |
| 361 | * @img_height: image height |
| 362 | * @bayer_order: pixel order |
| 363 | * @pix_align: alignment |
| 364 | * @yuv422_order: YUV order |
| 365 | * @byte_swap: byte swap |
| 366 | */ |
| 367 | struct image_info { |
| 368 | enum hfi_ipe_image_format format; |
| 369 | uint32_t img_width; |
| 370 | uint32_t img_height; |
| 371 | enum hfi_ipe_bayer_pixel_order bayer_order; |
| 372 | enum hfi_ipe_pixel_pack_alignment pix_align; |
| 373 | enum hfi_ipe_yuv_422_order yuv422_order; |
| 374 | uint32_t byte_swap; |
| 375 | } __packed; |
| 376 | |
| 377 | /** |
| 378 | * struct buffer_layout |
| 379 | * @buf_stride: buffer stride |
| 380 | * @buf_height: buffer height |
| 381 | */ |
| 382 | struct buffer_layout { |
| 383 | uint32_t buf_stride; |
| 384 | uint32_t buf_height; |
| 385 | } __packed; |
| 386 | |
| 387 | /** |
| 388 | * struct image_desc |
| 389 | * @info: image info |
| 390 | * @buf_layout: buffer layout |
| 391 | * @meta_buf_layout: meta buffer layout |
| 392 | */ |
| 393 | struct image_desc { |
| 394 | struct image_info info; |
| 395 | struct buffer_layout buf_layout[MAX_NUM_OF_IMAGE_PLANES]; |
| 396 | struct buffer_layout meta_buf_layout[MAX_NUM_OF_IMAGE_PLANES]; |
| 397 | } __packed; |
| 398 | |
Karthik Anantha Ram | 599c4e15 | 2017-12-14 15:03:48 -0800 | [diff] [blame] | 399 | struct ica_stab_coeff { |
| 400 | uint32_t coeffs[8]; |
| 401 | } __packed; |
| 402 | |
| 403 | struct ica_stab_params { |
| 404 | uint32_t mode; |
| 405 | struct ica_stab_coeff transforms[3]; |
| 406 | } __packed; |
| 407 | |
| 408 | struct frame_set { |
| 409 | struct frame_buffer buffers[IPE_IO_IMAGES_MAX]; |
| 410 | struct ica_stab_params ica_params; |
| 411 | uint32_t cdm_ica1_addr; |
| 412 | uint32_t cdm_ica2_addr; |
| 413 | } __packed; |
| 414 | |
| 415 | struct ipe_frame_process_data { |
| 416 | uint32_t strip_lib_out_addr; |
| 417 | uint32_t iq_settings_addr; |
| 418 | uint32_t scratch_buffer_addr; |
| 419 | uint32_t scratch_buffer_size; |
| 420 | uint32_t ubwc_stats_buffer_addr; |
| 421 | uint32_t ubwc_stats_buffer_size; |
| 422 | uint32_t cdm_buffer_addr; |
| 423 | uint32_t cdm_buffer_size; |
| 424 | uint32_t max_num_cores; |
| 425 | uint32_t target_time; |
| 426 | uint32_t cdm_prog_base; |
| 427 | uint32_t cdm_pre_ltm; |
| 428 | uint32_t cdm_post_ltm; |
| 429 | uint32_t cdm_anr_full_pass; |
| 430 | uint32_t cdm_anr_ds4; |
| 431 | uint32_t cdm_anr_ds16; |
| 432 | uint32_t cdm_anr_ds64; |
| 433 | uint32_t cdm_tf_full_pass; |
| 434 | uint32_t cdm_tf_ds4; |
| 435 | uint32_t cdm_tf_ds16; |
| 436 | uint32_t cdm_tf_ds64; |
Alok Pandey | 3473bcf | 2018-01-05 14:47:19 +0530 | [diff] [blame] | 437 | uint32_t request_id; |
Karthik Anantha Ram | 599c4e15 | 2017-12-14 15:03:48 -0800 | [diff] [blame] | 438 | uint32_t frames_in_batch; |
| 439 | struct frame_set framesets[MAX_HFR_GROUP]; |
| 440 | } __packed; |
| 441 | |
Lakshmi Narayana Kalavala | 85c4035 | 2017-05-15 16:19:13 -0700 | [diff] [blame] | 442 | /** |
| 443 | * struct hfi_cmd_ipe_config |
| 444 | * @images: images descreptions |
| 445 | * @user_data: user supplied data |
| 446 | * |
| 447 | * payload for IPE async command |
| 448 | */ |
| 449 | struct hfi_cmd_ipe_config { |
| 450 | struct image_desc images[IPE_IO_IMAGES_MAX]; |
| 451 | uint64_t user_data; |
| 452 | } __packed; |
| 453 | |
| 454 | /** |
| 455 | * struct frame_buffers |
| 456 | * @buf_ptr: buffer pointers for all planes |
| 457 | * @meta_buf_ptr: meta buffer pointers for all planes |
| 458 | */ |
| 459 | struct frame_buffers { |
| 460 | uint32_t buf_ptr[MAX_NUM_OF_IMAGE_PLANES]; |
| 461 | uint32_t meta_buf_ptr[MAX_NUM_OF_IMAGE_PLANES]; |
| 462 | } __packed; |
| 463 | |
| 464 | /** |
| 465 | * struct hfi_msg_ipe_config |
| 466 | * @rc: result of ipe config command |
| 467 | * @scratch_mem_size: scratch mem size for a config |
| 468 | * @user_data: user data |
| 469 | */ |
| 470 | struct hfi_msg_ipe_config { |
| 471 | uint32_t rc; |
| 472 | uint32_t scratch_mem_size; |
| 473 | uint64_t user_data; |
| 474 | } __packed; |
| 475 | |
| 476 | /** |
| 477 | * struct hfi_msg_bps_common |
| 478 | * @rc: result of ipe config command |
| 479 | * @user_data: user data |
| 480 | */ |
| 481 | struct hfi_msg_bps_common { |
| 482 | uint32_t rc; |
| 483 | uint64_t user_data; |
| 484 | } __packed; |
| 485 | |
| 486 | /** |
| 487 | * struct ipe_bps_destroy |
| 488 | * @user_data: user data |
| 489 | */ |
| 490 | struct ipe_bps_destroy { |
| 491 | uint64_t userdata; |
| 492 | }; |
| 493 | |
| 494 | /** |
| 495 | * struct hfi_msg_ipe_frame_process |
| 496 | * @status: result of ipe frame process command |
| 497 | * @scratch_buf_addr: address of scratch buffer |
| 498 | * @user_data: user data |
| 499 | */ |
| 500 | struct hfi_msg_ipe_frame_process { |
| 501 | uint32_t status; |
| 502 | uint32_t scratch_buf_addr; |
| 503 | uint64_t user_data; |
| 504 | } __packed; |
| 505 | |
| 506 | #endif /* _CAM_HFI_SESSION_DEFS_H */ |