Skip to content

Commit 6e68228

Browse files
Rahi374pinchartl
authored andcommitted
media: rkisp1: Add version enum for i.MX8MP ISP
The NXP i.MX8MP integrates an ISP8000Nano from VeriSilicon, which is a derivative of the ISP found in earlier Rockchip SoCs. It isn't clear at which exact point the two product lines have diverged, and there is no public information regarding the version numbering scheme of the ISP8000Nano. Nonetheless, this ISP is close enough to the V10 found in the RK3399 to be supported by the same driver. Add an entry for the ISP found in the NXP i.MX8MP to the version enum. Given the lack of information on the version numbering scheme, and on whether or not the version in the i.MX8MP is identical to other ISP8000Nano versions or has been customized for the i.MX8MP, depart from the number-based versions and name this new version V_IMX8MP. Update comments for the other versions and for relevant parameters blocks to clearly indicate the size of grids and histogram for the different versions. Signed-off-by: Paul Elder <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Tested-by: Alexander Stein <[email protected]>
1 parent 716f974 commit 6e68228

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

include/uapi/linux/rkisp1-config.h

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,21 @@
175175
/**
176176
* enum rkisp1_cif_isp_version - ISP variants
177177
*
178-
* @RKISP1_V10: used at least in rk3288 and rk3399
179-
* @RKISP1_V11: declared in the original vendor code, but not used
180-
* @RKISP1_V12: used at least in rk3326 and px30
181-
* @RKISP1_V13: used at least in rk1808
178+
* @RKISP1_V10: Used at least in RK3288 and RK3399.
179+
* @RKISP1_V11: Declared in the original vendor code, but not used. Same number
180+
* of entries in grids and histogram as v10.
181+
* @RKISP1_V12: Used at least in RK3326 and PX30.
182+
* @RKISP1_V13: Used at least in RK1808. Same number of entries in grids and
183+
* histogram as v12.
184+
* @RKISP1_V_IMX8MP: Used in at least i.MX8MP. Same number of entries in grids
185+
* and histogram as v10.
182186
*/
183187
enum rkisp1_cif_isp_version {
184188
RKISP1_V10 = 10,
185189
RKISP1_V11,
186190
RKISP1_V12,
187191
RKISP1_V13,
192+
RKISP1_V_IMX8MP,
188193
};
189194

190195
enum rkisp1_cif_isp_histogram_mode {
@@ -584,10 +589,9 @@ enum rkisp1_cif_isp_goc_mode {
584589
* as is reported by the hw_revision field of the struct media_device_info
585590
* that is returned by ioctl MEDIA_IOC_DEVICE_INFO.
586591
*
587-
* Versions <= V11 have RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10
588-
* entries, versions >= V12 have RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12
589-
* entries. RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES is equal to the maximum
590-
* of the two.
592+
* V10 has RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V10 entries, V12 has
593+
* RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES_V12 entries.
594+
* RKISP1_CIF_ISP_GAMMA_OUT_MAX_SAMPLES is equal to the maximum of the two.
591595
*/
592596
struct rkisp1_cif_isp_goc_config {
593597
__u32 mode;
@@ -607,10 +611,10 @@ struct rkisp1_cif_isp_goc_config {
607611
* as is reported by the hw_revision field of the struct media_device_info
608612
* that is returned by ioctl MEDIA_IOC_DEVICE_INFO.
609613
*
610-
* Versions <= V11 have RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10
611-
* entries, versions >= V12 have RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12
612-
* entries. RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE is equal to the maximum
613-
* of the two.
614+
* V10 has RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V10 entries, V12 has
615+
* RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE_V12 entries.
616+
* RKISP1_CIF_ISP_HISTOGRAM_WEIGHT_GRIDS_SIZE is equal to the maximum of the
617+
* two.
614618
*/
615619
struct rkisp1_cif_isp_hst_config {
616620
__u32 mode;
@@ -902,9 +906,9 @@ struct rkisp1_cif_isp_bls_meas_val {
902906
* as is reported by the hw_revision field of the struct media_device_info
903907
* that is returned by ioctl MEDIA_IOC_DEVICE_INFO.
904908
*
905-
* Versions <= V11 have RKISP1_CIF_ISP_AE_MEAN_MAX_V10 entries,
906-
* versions >= V12 have RKISP1_CIF_ISP_AE_MEAN_MAX_V12 entries.
907-
* RKISP1_CIF_ISP_AE_MEAN_MAX is equal to the maximum of the two.
909+
* V10 has RKISP1_CIF_ISP_AE_MEAN_MAX_V10 entries, V12 has
910+
* RKISP1_CIF_ISP_AE_MEAN_MAX_V12 entries. RKISP1_CIF_ISP_AE_MEAN_MAX is equal
911+
* to the maximum of the two.
908912
*
909913
* Image is divided into 5x5 blocks on V10 and 9x9 blocks on V12.
910914
*/
@@ -944,21 +948,21 @@ struct rkisp1_cif_isp_af_stat {
944948
* integer part.
945949
*
946950
* The window of the measurements area is divided to 5x5 sub-windows for
947-
* V10/V11 and to 9x9 sub-windows for V12. The histogram is then computed for
948-
* each sub-window independently and the final result is a weighted average of
949-
* the histogram measurements on all sub-windows. The window of the
950-
* measurements area and the weight of each sub-window are configurable using
951+
* V10 and to 9x9 sub-windows for V12. The histogram is then computed for each
952+
* sub-window independently and the final result is a weighted average of the
953+
* histogram measurements on all sub-windows. The window of the measurements
954+
* area and the weight of each sub-window are configurable using
951955
* struct @rkisp1_cif_isp_hst_config.
952956
*
953-
* The histogram contains 16 bins in V10/V11 and 32 bins in V12/V13.
957+
* The histogram contains 16 bins in V10 and 32 bins in V12.
954958
*
955959
* The number of entries of @hist_bins depends on the hardware revision
956960
* as is reported by the hw_revision field of the struct media_device_info
957961
* that is returned by ioctl MEDIA_IOC_DEVICE_INFO.
958962
*
959-
* Versions <= V11 have RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10 entries,
960-
* versions >= V12 have RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 entries.
961-
* RKISP1_CIF_ISP_HIST_BIN_N_MAX is equal to the maximum of the two.
963+
* V10 has RKISP1_CIF_ISP_HIST_BIN_N_MAX_V10 entries, V12 has
964+
* RKISP1_CIF_ISP_HIST_BIN_N_MAX_V12 entries. RKISP1_CIF_ISP_HIST_BIN_N_MAX is
965+
* equal to the maximum of the two.
962966
*/
963967
struct rkisp1_cif_isp_hist_stat {
964968
__u32 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX];

0 commit comments

Comments
 (0)