/* SPDX-License-Identifier: GPL-2.0 */ /* Release Version: irci_stable_candrpv_0415_20150521_0458 */ /* * Support for Intel Camera Imaging ISP subsystem. * Copyright (c) 2015, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. */ #ifndef _IA_CSS_TYPES_H #define _IA_CSS_TYPES_H /* @file * This file contains types used for the ia_css parameters. * These types are in a separate file because they are expected * to be used in software layers that do not access the CSS API * directly but still need to forward parameters for it. */ #include <type_support.h> #include "ia_css_frac.h" #include "isp/kernels/aa/aa_2/ia_css_aa2_types.h" #include "isp/kernels/anr/anr_1.0/ia_css_anr_types.h" #include "isp/kernels/anr/anr_2/ia_css_anr2_types.h" #include "isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h" #include "isp/kernels/csc/csc_1.0/ia_css_csc_types.h" #include "isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h" #include "isp/kernels/dp/dp_1.0/ia_css_dp_types.h" #include "isp/kernels/de/de_1.0/ia_css_de_types.h" #include "isp/kernels/de/de_2/ia_css_de2_types.h" #include "isp/kernels/fc/fc_1.0/ia_css_formats_types.h" #include "isp/kernels/fpn/fpn_1.0/ia_css_fpn_types.h" #include "isp/kernels/gc/gc_1.0/ia_css_gc_types.h" #include "isp/kernels/gc/gc_2/ia_css_gc2_types.h" #include "isp/kernels/macc/macc_1.0/ia_css_macc_types.h" #include "isp/kernels/ob/ob_1.0/ia_css_ob_types.h" #include "isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h" #include "isp/kernels/sc/sc_1.0/ia_css_sc_types.h" #include "isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h" #include "isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h" #include "isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h" #include "isp/kernels/wb/wb_1.0/ia_css_wb_types.h" #include "isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h" #include "isp/kernels/xnr/xnr_3.0/ia_css_xnr3_types.h" /* ISP2401 */ #include "isp/kernels/tnr/tnr3/ia_css_tnr3_types.h" #include "isp/kernels/ynr/ynr_1.0/ia_css_ynr_types.h" #include "isp/kernels/ynr/ynr_2/ia_css_ynr2_types.h" #include "isp/kernels/output/output_1.0/ia_css_output_types.h" #define IA_CSS_DVS_STAT_GRID_INFO_SUPPORTED /** Should be removed after Driver adaptation will be done */ #define IA_CSS_VERSION_MAJOR … #define IA_CSS_VERSION_MINOR … #define IA_CSS_VERSION_REVISION … #define IA_CSS_MORPH_TABLE_NUM_PLANES … /* Min and max exposure IDs. These macros are here to allow * the drivers to get this information. Changing these macros * constitutes a CSS API change. */ #define IA_CSS_ISYS_MIN_EXPOSURE_ID … #define IA_CSS_ISYS_MAX_EXPOSURE_ID … /* opaque types */ struct ia_css_isp_parameters; struct ia_css_pipe; struct ia_css_memory_offsets; struct ia_css_config_memory_offsets; struct ia_css_state_memory_offsets; /* Virtual address within the CSS address space. */ ia_css_ptr; #define SIZE_OF_IA_CSS_PTR … /* Generic resolution structure. */ struct ia_css_resolution { … }; /* Generic coordinate structure. */ struct ia_css_coordinate { … }; /* Vector with signed values. This is used to indicate motion for * Digital Image Stabilization. */ struct ia_css_vector { … }; /* Short hands */ #define IA_CSS_ISP_DMEM … #define IA_CSS_ISP_VMEM … /* CSS data descriptor */ struct ia_css_data { … }; /* Host data descriptor */ struct ia_css_host_data { … }; /* ISP data descriptor */ struct ia_css_isp_data { … }; /* Shading Correction types. */ enum ia_css_shading_correction_type { … }; /* Shading Correction information. */ struct ia_css_shading_info { … }; /* Default Shading Correction information of Shading Correction Type 1. */ #define DEFAULT_SHADING_INFO_TYPE_1 … /* Default Shading Correction information. */ #define DEFAULT_SHADING_INFO … /* structure that describes the 3A and DIS grids */ struct ia_css_grid_info { … }; /* defaults for ia_css_grid_info structs */ #define DEFAULT_GRID_INFO … /* Morphing table, used for geometric distortion and chromatic abberration * correction (GDCAC, also called GDC). * This table describes the imperfections introduced by the lens, the * advanced ISP can correct for these imperfections using this table. */ struct ia_css_morph_table { … }; struct ia_css_dvs_6axis_config { … }; /** * This specifies the coordinates (x,y) */ struct ia_css_point { … }; /** * This specifies the region */ struct ia_css_region { … }; /** * Digital zoom: * This feature is currently available only for video, but will become * available for preview and capture as well. * Set the digital zoom factor, this is a logarithmic scale. The actual zoom * factor will be 64/x. * Setting dx or dy to 0 disables digital zoom for that direction. * New API change for Digital zoom:(added struct ia_css_region zoom_region) * zoom_region specifies the origin of the zoom region and width and * height of that region. * origin : This is the coordinate (x,y) within the effective input resolution * of the stream. where, x >= 0 and y >= 0. (0,0) maps to the upper left of the * effective input resolution. * resolution : This is resolution of zoom region. * where, x + width <= effective input width * y + height <= effective input height */ struct ia_css_dz_config { … }; /* The still capture mode, this can be RAW (simply copy sensor input to DDR), * Primary ISP, the Advanced ISP (GDC) or the low-light ISP (ANR). */ enum ia_css_capture_mode { … }; struct ia_css_capture_config { … }; /* default settings for ia_css_capture_config structs */ #define DEFAULT_CAPTURE_CONFIG … /* ISP filter configuration. This is a collection of configurations * for each of the ISP filters (modules). * * NOTE! The contents of all pointers is copied when get or set with the * exception of the shading and morph tables. For these we only copy the * pointer, so the caller must make sure the memory contents of these pointers * remain valid as long as they are used by the CSS. This will be fixed in the * future by copying the contents instead of just the pointer. * * Comment: * ["ISP block", 1&2] : ISP block is used both for ISP1 and ISP2. * ["ISP block", 1only] : ISP block is used only for ISP1. * ["ISP block", 2only] : ISP block is used only for ISP2. */ struct ia_css_isp_config { … }; #endif /* _IA_CSS_TYPES_H */