diff options
author | Kate Hsuan <hpa@redhat.com> | 2023-08-02 12:55:56 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-09-27 10:40:03 +0300 |
commit | 2b5d1e149edf31d54bd93417bf81c960a96019b3 (patch) | |
tree | e509fe54c2019533ddf03137cd45c8c62485ae46 /drivers | |
parent | 68b9a816cabefc9c9f04c7b99ad2d92cb306136b (diff) | |
download | linux-2b5d1e149edf31d54bd93417bf81c960a96019b3.tar.xz |
media: atomisp: binary: Removed #ifdef ISP2401 to make driver generic
Removed #ifdef ISP2401 to make the driver generic. The driver flow is
determined in runtime.
Link: https://lore.kernel.org/r/20230802095606.1298152-3-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')
-rw-r--r-- | drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c b/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c index 768da86b8c2c..0f3729e55e14 100644 --- a/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c +++ b/drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c @@ -604,13 +604,14 @@ binary_in_frame_padded_width(int in_frame_width, int rval; int nr_of_left_paddings; /* number of paddings pixels on the left of an image line */ -#if defined(ISP2401) - /* the output image line of Input System 2401 does not have the left paddings */ - nr_of_left_paddings = 0; -#else - /* in other cases, the left padding pixels are always 128 */ - nr_of_left_paddings = 2 * ISP_VEC_NELEMS; -#endif + if (IS_ISP2401) { + /* the output image line of Input System 2401 does not have the left paddings */ + nr_of_left_paddings = 0; + } else { + /* in other cases, the left padding pixels are always 128 */ + nr_of_left_paddings = 2 * ISP_VEC_NELEMS; + } + if (need_scaling) { /* In SDV use-case, we need to match left-padding of * primary and the video binary. */ |