@@ -989,7 +989,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
989
989
break ;
990
990
case IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME :
991
991
case IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME :
992
- if (atomisp_hw_is_isp2401 )
992
+ if (IS_ISP2401 )
993
993
reset_wdt_timer = true;
994
994
995
995
pipe -> buffers_in_css -- ;
@@ -1038,18 +1038,18 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
1038
1038
1039
1039
asd -> pending_capture_request -- ;
1040
1040
1041
- if (atomisp_hw_is_isp2401 )
1041
+ if (IS_ISP2401 )
1042
1042
asd -> re_trigger_capture = false;
1043
1043
1044
1044
dev_dbg (isp -> dev , "Trigger capture again for new buffer. err=%d\n" ,
1045
1045
err );
1046
- } else if (atomisp_hw_is_isp2401 ) {
1046
+ } else if (IS_ISP2401 ) {
1047
1047
asd -> re_trigger_capture = true;
1048
1048
}
1049
1049
break ;
1050
1050
case IA_CSS_BUFFER_TYPE_OUTPUT_FRAME :
1051
1051
case IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME :
1052
- if (atomisp_hw_is_isp2401 )
1052
+ if (IS_ISP2401 )
1053
1053
reset_wdt_timer = true;
1054
1054
1055
1055
pipe -> buffers_in_css -- ;
@@ -1219,7 +1219,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
1219
1219
*/
1220
1220
wake_up (& vb -> done );
1221
1221
}
1222
- if (atomisp_hw_is_isp2401 )
1222
+ if (IS_ISP2401 )
1223
1223
atomic_set (& pipe -> wdt_count , 0 );
1224
1224
1225
1225
/*
@@ -1239,7 +1239,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
1239
1239
if (!error && q_buffers )
1240
1240
atomisp_qbuffers_to_css (asd );
1241
1241
1242
- if (atomisp_hw_is_isp2401 ) {
1242
+ if (IS_ISP2401 ) {
1243
1243
/* If there are no buffers queued then
1244
1244
* delete wdt timer. */
1245
1245
if (asd -> streaming != ATOMISP_DEVICE_STREAMING_ENABLED )
@@ -1475,7 +1475,7 @@ void atomisp_wdt_work(struct work_struct *work)
1475
1475
return ;
1476
1476
}
1477
1477
1478
- if (!atomisp_hw_is_isp2401 ) {
1478
+ if (!IS_ISP2401 ) {
1479
1479
dev_err (isp -> dev , "timeout %d of %d\n" ,
1480
1480
atomic_read (& isp -> wdt_count ) + 1 ,
1481
1481
ATOMISP_ISP_MAX_TIMEOUT_COUNT );
@@ -1598,11 +1598,11 @@ void atomisp_wdt_work(struct work_struct *work)
1598
1598
atomisp_flush_bufs_and_wakeup (asd );
1599
1599
complete (& asd -> init_done );
1600
1600
}
1601
- if (atomisp_hw_is_isp2401 )
1601
+ if (IS_ISP2401 )
1602
1602
atomisp_wdt_stop (asd , false);
1603
1603
}
1604
1604
1605
- if (!atomisp_hw_is_isp2401 ) {
1605
+ if (!IS_ISP2401 ) {
1606
1606
atomic_set (& isp -> wdt_count , 0 );
1607
1607
} else {
1608
1608
isp -> isp_fatal_error = true;
@@ -1614,7 +1614,7 @@ void atomisp_wdt_work(struct work_struct *work)
1614
1614
}
1615
1615
1616
1616
__atomisp_css_recover (isp , true);
1617
- if (atomisp_hw_is_isp2401 ) {
1617
+ if (IS_ISP2401 ) {
1618
1618
for (i = 0 ; i < isp -> num_of_streams ; i ++ ) {
1619
1619
struct atomisp_sub_device * asd = & isp -> asd [i ];
1620
1620
@@ -1671,7 +1671,7 @@ void atomisp_wdt(struct timer_list *t)
1671
1671
struct atomisp_sub_device * asd ;
1672
1672
struct atomisp_device * isp ;
1673
1673
1674
- if (!atomisp_hw_is_isp2401 ) {
1674
+ if (!IS_ISP2401 ) {
1675
1675
asd = from_timer (asd , t , wdt );
1676
1676
isp = asd -> isp ;
1677
1677
} else {
@@ -1730,7 +1730,7 @@ void atomisp_wdt_refresh_pipe(struct atomisp_video_pipe *pipe,
1730
1730
1731
1731
void atomisp_wdt_refresh (struct atomisp_sub_device * asd , unsigned int delay )
1732
1732
{
1733
- if (!atomisp_hw_is_isp2401 ) {
1733
+ if (!IS_ISP2401 ) {
1734
1734
unsigned long next ;
1735
1735
1736
1736
if (delay != ATOMISP_WDT_KEEP_CURRENT_DELAY )
@@ -1793,7 +1793,7 @@ void atomisp_wdt_stop(struct atomisp_sub_device *asd, bool sync)
1793
1793
{
1794
1794
dev_dbg (asd -> isp -> dev , "WDT stop:\n" );
1795
1795
1796
- if (!atomisp_hw_is_isp2401 ) {
1796
+ if (!IS_ISP2401 ) {
1797
1797
if (sync ) {
1798
1798
del_timer_sync (& asd -> wdt );
1799
1799
cancel_work_sync (& asd -> isp -> wdt_work );
@@ -3014,7 +3014,7 @@ int atomisp_calculate_real_zoom_region(struct atomisp_sub_device *asd,
3014
3014
* map real crop region base on above calculating base max crop region.
3015
3015
*/
3016
3016
3017
- if (!atomisp_hw_is_isp2401 ) {
3017
+ if (!IS_ISP2401 ) {
3018
3018
dz_config -> zoom_region .origin .x = dz_config -> zoom_region .origin .x
3019
3019
* eff_res .width
3020
3020
/ asd -> sensor_array_res .width ;
@@ -3584,7 +3584,7 @@ int atomisp_cp_lsc_table(struct atomisp_sub_device *asd,
3584
3584
if (!from_user && css_param -> update_flag .shading_table )
3585
3585
return 0 ;
3586
3586
3587
- if (atomisp_hw_is_isp2401 ) {
3587
+ if (IS_ISP2401 ) {
3588
3588
if (copy_from_compatible (& dest_st , source_st ,
3589
3589
sizeof (struct atomisp_shading_table ),
3590
3590
from_user )) {
@@ -3617,7 +3617,7 @@ int atomisp_cp_lsc_table(struct atomisp_sub_device *asd,
3617
3617
}
3618
3618
3619
3619
/* Shading table size per color */
3620
- if (!atomisp_hw_is_isp2401 ) {
3620
+ if (!IS_ISP2401 ) {
3621
3621
if (st -> width > ISP2400_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
3622
3622
st -> height > ISP2400_SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR ) {
3623
3623
dev_err (asd -> isp -> dev , "shading table w/h validate failed!" );
@@ -3700,7 +3700,7 @@ int atomisp_css_cp_dvs2_coefs(struct atomisp_sub_device *asd,
3700
3700
if (!from_user && css_param -> update_flag .dvs2_coefs )
3701
3701
return 0 ;
3702
3702
3703
- if (!atomisp_hw_is_isp2401 ) {
3703
+ if (!IS_ISP2401 ) {
3704
3704
if (sizeof (* cur ) != sizeof (coefs -> grid ) ||
3705
3705
memcmp (& coefs -> grid , cur , sizeof (coefs -> grid ))) {
3706
3706
dev_err (asd -> isp -> dev , "dvs grid mis-match!\n" );
@@ -3843,7 +3843,7 @@ int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd,
3843
3843
old_6axis_config = css_param -> dvs_6axis ;
3844
3844
dvs_6axis_config = old_6axis_config ;
3845
3845
3846
- if (atomisp_hw_is_isp2401 ) {
3846
+ if (IS_ISP2401 ) {
3847
3847
struct ia_css_dvs_6axis_config t_6axis_config ;
3848
3848
3849
3849
if (copy_from_compatible (& t_6axis_config , source_6axis_config ,
@@ -3978,7 +3978,7 @@ int atomisp_cp_morph_table(struct atomisp_sub_device *asd,
3978
3978
3979
3979
old_morph_table = css_param -> morph_table ;
3980
3980
3981
- if (atomisp_hw_is_isp2401 ) {
3981
+ if (IS_ISP2401 ) {
3982
3982
struct ia_css_morph_table mtbl ;
3983
3983
3984
3984
if (copy_from_compatible (& mtbl , source_morph_table ,
@@ -4168,7 +4168,7 @@ void atomisp_handle_parameter_and_buffer(struct atomisp_video_pipe *pipe)
4168
4168
4169
4169
atomisp_qbuffers_to_css (asd );
4170
4170
4171
- if (!atomisp_hw_is_isp2401 ) {
4171
+ if (!IS_ISP2401 ) {
4172
4172
if (!atomisp_is_wdt_running (asd ) && atomisp_buffers_queued (asd ))
4173
4173
atomisp_wdt_start (asd );
4174
4174
} else {
@@ -4204,7 +4204,7 @@ int atomisp_set_parameters(struct video_device *vdev,
4204
4204
__func__ , arg -> per_frame_setting , asd -> index ,
4205
4205
arg -> isp_config_id , vdev -> name );
4206
4206
4207
- if (atomisp_hw_is_isp2401 ) {
4207
+ if (IS_ISP2401 ) {
4208
4208
if (atomisp_is_vf_pipe (pipe ) && arg -> per_frame_setting ) {
4209
4209
dev_err (asd -> isp -> dev , "%s: vf pipe not support per_frame_setting" ,
4210
4210
__func__ );
@@ -5070,7 +5070,7 @@ static int __enable_continuous_mode(struct atomisp_sub_device *asd,
5070
5070
enable , asd -> continuous_raw_buffer_size -> val ,
5071
5071
!asd -> continuous_viewfinder -> val );
5072
5072
5073
- if (!atomisp_hw_is_isp2401 )
5073
+ if (!IS_ISP2401 )
5074
5074
atomisp_css_capture_set_mode (asd , IA_CSS_CAPTURE_MODE_PRIMARY );
5075
5075
else
5076
5076
atomisp_update_capture_mode (asd );
@@ -5961,7 +5961,7 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
5961
5961
* which appears to be related by a hardware
5962
5962
* performance limitation. It's unclear why this
5963
5963
* particular code triggers the issue. */
5964
- if (!atomisp_hw_is_isp2401 || crop_needs_override ) {
5964
+ if (!IS_ISP2401 || crop_needs_override ) {
5965
5965
if (isp_sink_crop .width * main_compose .height >
5966
5966
isp_sink_crop .height * main_compose .width ) {
5967
5967
sink_crop .height = isp_sink_crop .height ;
@@ -6107,7 +6107,7 @@ int atomisp_set_shading_table(struct atomisp_sub_device *asd,
6107
6107
}
6108
6108
6109
6109
/* Shading table size per color */
6110
- if (!atomisp_hw_is_isp2401 ) {
6110
+ if (!IS_ISP2401 ) {
6111
6111
if (user_shading_table -> width > ISP2400_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
6112
6112
user_shading_table -> height > ISP2400_SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR )
6113
6113
return - EINVAL ;
0 commit comments