diff options
author | Kate Hsuan <hpa@redhat.com> | 2023-08-02 11:55:55 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-09-27 09:40:03 +0200 |
commit | 68b9a816cabefc9c9f04c7b99ad2d92cb306136b (patch) | |
tree | ab517147f1496734bc4185ee703800ac381b6b84 /drivers/staging | |
parent | b6e5978323d5aca0b64f02efbca5f735c114eeb0 (diff) | |
download | linux-68b9a816cabefc9c9f04c7b99ad2d92cb306136b.tar.gz linux-68b9a816cabefc9c9f04c7b99ad2d92cb306136b.tar.bz2 linux-68b9a816cabefc9c9f04c7b99ad2d92cb306136b.zip |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/atomisp/pci/isp/kernels/raw/raw_1.0/ia_css_raw.host.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/raw/raw_1.0/ia_css_raw.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/raw/raw_1.0/ia_css_raw.host.c index 646d6e39c1e5..40d4a0521562 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/raw/raw_1.0/ia_css_raw.host.c +++ b/drivers/staging/media/atomisp/pci/isp/kernels/raw/raw_1.0/ia_css_raw.host.c @@ -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; } |