summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKate Hsuan <hpa@redhat.com>2023-08-02 12:56:00 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-09-27 10:40:04 +0300
commit1e1ea859e4e6c2346be1513c006447a62717133a (patch)
tree62062af54172665a089b14bafd56b2e35ec9b511
parentfc280df3aa3738865bff77dfb0fafc249ac87954 (diff)
downloadlinux-1e1ea859e4e6c2346be1513c006447a62717133a.tar.xz
media: atomisp: sh_css: Removed #ifdef ISP2401 to make the driver generic
Removed #ifdef ISP2401 to expose the necessary functions for ISP2401 and also make the driver generic. Link: https://lore.kernel.org/r/20230802095606.1298152-7-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>
-rw-r--r--drivers/staging/media/atomisp/pci/sh_css.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 67c581d3c1a6..8b5fb3703d59 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -2957,7 +2957,6 @@ init_vf_frameinfo_defaults(struct ia_css_pipe *pipe,
return err;
}
-#ifdef ISP2401
static unsigned int
get_crop_lines_for_bayer_order(const struct ia_css_stream_config *config)
{
@@ -3059,11 +3058,11 @@ ia_css_get_crop_offsets(
pipe->config.input_effective_res.height);
input_res = &pipe->stream->config.input_config.input_res;
-#ifndef ISP2401
- effective_res = &pipe->stream->config.input_config.effective_res;
-#else
- effective_res = &pipe->config.input_effective_res;
-#endif
+
+ if (IS_ISP2401)
+ effective_res = &pipe->config.input_effective_res;
+ else
+ effective_res = &pipe->stream->config.input_config.effective_res;
get_pipe_extra_pixel(pipe, &extra_row, &extra_col);
@@ -3101,7 +3100,6 @@ ia_css_get_crop_offsets(
return;
}
-#endif
static int
init_in_frameinfo_memory_defaults(struct ia_css_pipe *pipe,