media: atomisp: ia_css_raw.host: Remove #ifdef ISP2401 to make the driver generic
Remove #ifdef from the code and made the code generic. The raw image configuration was determined during runtime. Link: https://lore.kernel.org/r/20230802095606.1298152-2-hpa@redhat.com Signed-off-by: Kate Hsuan <hpa@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
b6e5978323
commit
68b9a816ca
@ -73,17 +73,9 @@ int ia_css_raw_config(struct sh_css_isp_raw_isp_config *to,
|
||||
const struct ia_css_frame_info *internal_info = from->internal_info;
|
||||
int ret;
|
||||
|
||||
#if !defined(ISP2401)
|
||||
/* 2401 input system uses input width width */
|
||||
in_info = internal_info;
|
||||
#else
|
||||
/*in some cases, in_info is NULL*/
|
||||
if (in_info)
|
||||
(void)internal_info;
|
||||
else
|
||||
if (!IS_ISP2401 || !in_info)
|
||||
in_info = internal_info;
|
||||
|
||||
#endif
|
||||
ret = ia_css_dma_configure_from_info(&to->port_b, in_info);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -99,11 +91,12 @@ int ia_css_raw_config(struct sh_css_isp_raw_isp_config *to,
|
||||
to->two_ppc = from->two_ppc;
|
||||
to->stream_format = css2isp_stream_format(from->stream_format);
|
||||
to->deinterleaved = from->deinterleaved;
|
||||
#if defined(ISP2401)
|
||||
to->start_column = in_info->crop_info.start_column;
|
||||
to->start_line = in_info->crop_info.start_line;
|
||||
to->enable_left_padding = from->enable_left_padding;
|
||||
#endif
|
||||
|
||||
if (IS_ISP2401) {
|
||||
to->start_column = in_info->crop_info.start_column;
|
||||
to->start_line = in_info->crop_info.start_line;
|
||||
to->enable_left_padding = from->enable_left_padding;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user