media: atomisp: remove bayer_io_ls duplication
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 29 Apr 2020 08:35:30 +0000 (10:35 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 May 2020 10:32:18 +0000 (12:32 +0200)
There are two instances of those, one for isp2401 and another
one for isp2400, both with identical contents, except for
comments and an ifdef.

Get rid of one of them.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp2/Makefile
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io.host.c [deleted file]
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io.host.h [deleted file]
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io_param.h [deleted file]
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io_types.h [deleted file]
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/yuv444_io_ls/ia_css_yuv444_io_types.h [deleted file]
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.c
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io_param.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io_types.h
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c

index 7fead5fc9a7df48a047a8a7231be4d87a0d3e269..ad9a8e69a5077261da931042179131456cad28dc 100644 (file)
@@ -86,7 +86,7 @@ atomisp-objs += \
        css2400/isp/kernels/gc/gc_1.0/ia_css_gc.host.o \
        css2400/isp/kernels/gc/gc_1.0/ia_css_gc_table.host.o \
        css2400/isp/kernels/crop/crop_1.0/ia_css_crop.host.o \
-       css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io.host.o \
+       css2400/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.o \
        css2400/isp/kernels/aa/aa_2/ia_css_aa2.host.o \
        css2400/isp/kernels/copy_output/copy_output_1.0/ia_css_copy_output.host.o \
        css2400/isp/kernels/ob/ob_1.0/ia_css_ob.host.o \
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io.host.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io.host.c
deleted file mode 100644 (file)
index c50b3d1..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-#ifndef ISP2401
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- */
-
-#include "ia_css_bayer_io.host.h"
-#include "dma.h"
-#include "math_support.h"
-#ifndef IA_CSS_NO_DEBUG
-#include "ia_css_debug.h"
-#endif
-#include "ia_css_isp_params.h"
-#include "ia_css_frame.h"
-
-void
-ia_css_bayer_io_config(
-    const struct ia_css_binary      *binary,
-    const struct sh_css_binary_args *args)
-{
-       const struct ia_css_frame *in_frame = args->in_frame;
-       const struct ia_css_frame **out_frames = (const struct ia_css_frame **)
-               &args->out_frame;
-       const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info :
-               &binary->in_frame_info;
-
-       const unsigned int ddr_bits_per_element = sizeof(short) * 8;
-       const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS,
-                                               ddr_bits_per_element);
-       unsigned int size_get = 0, size_put = 0;
-       unsigned int offset = 0;
-
-       if (binary->info->mem_offsets.offsets.param) {
-               size_get = binary->info->mem_offsets.offsets.param->dmem.get.size;
-               offset = binary->info->mem_offsets.offsets.param->dmem.get.offset;
-       }
-
-       if (size_get) {
-               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
-                                                    &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
-               struct dma_port_config config;
-#ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                   "ia_css_bayer_io_config() get part enter:\n");
-#endif
-
-               ia_css_dma_configure_from_info(&config, in_frame_info);
-               // The base_address of the input frame will be set in the ISP
-               to->width = in_frame_info->res.width;
-               to->height = in_frame_info->res.height;
-               to->stride = config.stride;
-               to->ddr_elems_per_word = ddr_elems_per_word;
-#ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                   "ia_css_bayer_io_config() get part leave:\n");
-#endif
-       }
-
-       if (binary->info->mem_offsets.offsets.param) {
-               size_put = binary->info->mem_offsets.offsets.param->dmem.put.size;
-               offset = binary->info->mem_offsets.offsets.param->dmem.put.offset;
-       }
-
-       if (size_put) {
-               struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
-                                                    &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
-               struct dma_port_config config;
-#ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                   "ia_css_bayer_io_config() put part enter:\n");
-#endif
-
-               ia_css_dma_configure_from_info(&config, &out_frames[0]->info);
-               to->base_address = out_frames[0]->data;
-               to->width = out_frames[0]->info.res.width;
-               to->height = out_frames[0]->info.res.height;
-               to->stride = config.stride;
-               to->ddr_elems_per_word = ddr_elems_per_word;
-
-#ifndef IA_CSS_NO_DEBUG
-               ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
-                                   "ia_css_bayer_io_config() put part leave:\n");
-#endif
-       }
-}
-#endif
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io.host.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io.host.h
deleted file mode 100644 (file)
index 33642f0..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- */
-
-#ifndef __BAYER_IO_HOST_H
-#define __BAYER_IO_HOST_H
-
-#include "ia_css_bayer_io_param.h"
-#include "ia_css_bayer_io_types.h"
-#include "ia_css_binary.h"
-#include "sh_css_internal.h"
-
-void
-ia_css_bayer_io_config(
-    const struct ia_css_binary     *binary,
-    const struct sh_css_binary_args *args);
-
-#endif /*__BAYER_IO_HOST_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io_param.h
deleted file mode 100644 (file)
index 9fe58b2..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- */
-
-#ifndef __IA_CSS_BAYER_IO_PARAM
-#define __IA_CSS_BAYER_IO_PARAM
-
-#include "../common/ia_css_common_io_param.h"
-
-#endif /* __IA_CSS_BAYER_IO_PARAM */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io_types.h
deleted file mode 100644 (file)
index c2a8336..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- */
-
-#ifndef __IA_CSS_BAYER_IO_TYPES_H
-#define __IA_CSS_BAYER_IO_TYPES_H
-
-#include "../common/ia_css_common_io_types.h"
-
-#endif /* __IA_CSS_BAYER_IO_TYPES_H */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/yuv444_io_ls/ia_css_yuv444_io_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/io_ls/yuv444_io_ls/ia_css_yuv444_io_types.h
deleted file mode 100644 (file)
index 5d0c92a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- */
-
-#ifndef __IA_CSS_YUV444_IO_TYPES
-#define __IA_CSS_YUV444_IO_TYPES
-
-#include "../common/ia_css_common_io_types.h"
-
-#endif
index 96abc16607210b962cff8f86ab05db219cae3c49..bf71a7f661e63c6497791f1e7da920297a4100b6 100644 (file)
@@ -1,17 +1,16 @@
-#ifdef ISP2401
 /*
-Support for Intel Camera Imaging ISP subsystem.
-Copyright (c) 2010 - 2015, Intel Corporation.
-
-This program is free software; you can redistribute it and/or modify it
-under the terms and conditions of the GNU General Public License,
-version 2, as published by the Free Software Foundation.
-
-This program is distributed in the hope it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-more details.
-*/
+ * Support for Intel Camera Imaging ISP subsystem.
+ * Copyright (c) 2010 - 2015, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
 
 #include "ia_css_bayer_io.host.h"
 #include "dma.h"
@@ -92,4 +91,3 @@ ia_css_bayer_io_config(
 #endif
        }
 }
-#endif
index 31dcf394ffb65344debe4e23e86d964e63d39d35..f9db75a089afcfd3364c830c388a171a05605c3f 100644 (file)
@@ -1,16 +1,16 @@
-/**
-Support for Intel Camera Imaging ISP subsystem.
-Copyright (c) 2010 - 2015, Intel Corporation.
-
-This program is free software; you can redistribute it and/or modify it
-under the terms and conditions of the GNU General Public License,
-version 2, as published by the Free Software Foundation.
-
-This program is distributed in the hope it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-more details.
-*/
+/*
+ * Support for Intel Camera Imaging ISP subsystem.
+ * Copyright (c) 2010 - 2015, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
 
 #ifndef __BAYER_IO_HOST_H
 #define __BAYER_IO_HOST_H
index ea9d3ab973994e3f4c8558e3c8f81fe041c0cf3c..77cfed002e146835fe7eeb82893cb7cd4849bad7 100644 (file)
@@ -1,16 +1,16 @@
-/**
-Support for Intel Camera Imaging ISP subsystem.
-Copyright (c) 2010 - 2015, Intel Corporation.
-
-This program is free software; you can redistribute it and/or modify it
-under the terms and conditions of the GNU General Public License,
-version 2, as published by the Free Software Foundation.
-
-This program is distributed in the hope it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-more details.
-*/
+/*
+ * Support for Intel Camera Imaging ISP subsystem.
+ * Copyright (c) 2010 - 2015, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
 
 #ifndef __IA_CSS_BAYER_IO_PARAM
 #define __IA_CSS_BAYER_IO_PARAM
index 1e234e81d0fd622a86636b77936128de8a286b64..59b58f30af1129f2182e289464809947bf059b09 100644 (file)
@@ -1,16 +1,16 @@
-/**
-Support for Intel Camera Imaging ISP subsystem.
-Copyright (c) 2010 - 2015, Intel Corporation.
-
-This program is free software; you can redistribute it and/or modify it
-under the terms and conditions of the GNU General Public License,
-version 2, as published by the Free Software Foundation.
-
-This program is distributed in the hope it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-more details.
-*/
+/*
+ * Support for Intel Camera Imaging ISP subsystem.
+ * Copyright (c) 2010 - 2015, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
 
 #ifndef __IA_CSS_BAYER_IO_TYPES_H
 #define __IA_CSS_BAYER_IO_TYPES_H
index b223a38942b1512dddc0a885ec037a05a01b3b05..5eb45db5c65317fd81ad9819f90cf383f0718c47 100644 (file)
 #define IA_CSS_INCLUDE_STATES
 #include "ia_css_isp_states.h"
 
-#ifndef ISP2401
-#include "isp/kernels/io_ls/bayer_io_ls/ia_css_bayer_io.host.h"
-#else
 #include "isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.h"
-#endif
 
 struct sh_css_sp_group         sh_css_sp_group;
 struct sh_css_sp_stage         sh_css_sp_stage;