From c6552aebbe6cae982fd33bd885fcc111da3eeed8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Apr 2020 14:24:48 +0200 Subject: [PATCH] media: atomisp: get rid of __ISP define tests This is not defined anywhere, so just get rid of the dead source code. Signed-off-by: Mauro Carvalho Chehab --- .../hive_isp_css_common/host/vamem_private.h | 36 ------------------- .../css2400/hive_isp_css_include/vamem.h | 9 ----- .../pci/atomisp2/css2400/ia_css_acc_types.h | 4 +-- .../pci/atomisp2/css2400/ia_css_buffer.h | 4 +-- .../isp/modes/interface/input_buf.isp.h | 23 ------------ .../css2400/isp/modes/interface/isp_types.h | 33 ----------------- .../pci/atomisp2/css2400/sh_css_internal.h | 15 +------- 7 files changed, 3 insertions(+), 121 deletions(-) delete mode 100644 drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/vamem_private.h diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/vamem_private.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/vamem_private.h deleted file mode 100644 index 78a607bb4e713..0000000000000 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/vamem_private.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 __VAMEM_PRIVATE_H_INCLUDED__ -#define __VAMEM_PRIVATE_H_INCLUDED__ - -#include "vamem_public.h" - -#include - -#include "assert_support.h" - -STORAGE_CLASS_ISP_C void isp_vamem_store( - const vamem_ID_t ID, - vamem_data_t *addr, - const vamem_data_t *data, - const size_t size) /* in vamem_data_t */ -{ - assert(ID < N_VAMEM_ID); - assert(ISP_VAMEM_BASE[ID] != (hrt_address) - 1); - hrt_master_port_store(ISP_VAMEM_BASE[ID] + (unsigned int)addr, data, - size * sizeof(vamem_data_t)); -} - -#endif /* __VAMEM_PRIVATE_H_INCLUDED__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/vamem.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/vamem.h index 032f371a72c40..9918ca3981381 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/vamem.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/vamem.h @@ -31,15 +31,6 @@ #include "system_local.h" #include "vamem_local.h" - -#ifndef __INLINE_VAMEM__ -#define STORAGE_CLASS_VAMEM_H extern -#define STORAGE_CLASS_VAMEM_C #include "vamem_public.h" -#else /* __INLINE_VAMEM__ */ -#define STORAGE_CLASS_VAMEM_H static inline -#define STORAGE_CLASS_VAMEM_C static inline -#include "vamem_private.h" -#endif /* __INLINE_VAMEM__ */ #endif /* __VAMEM_H_INCLUDED__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h index d429ffaa972fa..d281846eeba56 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h @@ -355,7 +355,7 @@ struct ia_css_sp_info { issue with the firmware struct/union's. More permanent solution will be to refactor this include. */ -#if !defined(__ISP) + /* Accelerator firmware information. */ struct ia_css_acc_info { @@ -468,8 +468,6 @@ struct ia_css_acc_fw { #define IA_CSS_EXT_ISP_MEM_OFFSETS(f) \ ((const struct ia_css_memory_offsets *)((const char *)(f) + (f)->blob.mem_offsets)) -#endif /* !defined(__ISP) */ - enum ia_css_sp_sleep_mode { SP_DISABLE_SLEEP_MODE = 0, SP_SLEEP_AFTER_FRAME = 1 << 0, diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h index 403fa9416d0fa..38e1f4791029e 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h @@ -47,7 +47,7 @@ enum ia_css_buffer_type { }; /* Driver API is not SP/ISP visible, 64 bit types not supported on hivecc */ -#if !defined(__ISP) + /* Buffer structure. This is a container structure that enables content * independent buffer queues and access functions. */ @@ -82,6 +82,4 @@ struct ia_css_buffer { void ia_css_dequeue_param_buffers(void); -#endif /* !__ISP */ - #endif /* __IA_CSS_BUFFER_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/input_buf.isp.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/input_buf.isp.h index e7941f9614d52..5774c905d8e1f 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/input_buf.isp.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/input_buf.isp.h @@ -33,28 +33,5 @@ more details. /* The input buffer should be on a fixed address in vmem, for continuous capture */ #define INPUT_BUF_ADDR 0x0 -#if (defined(__ISP) && (!defined(MODE) || MODE != IA_CSS_BINARY_MODE_COPY)) - -#if ENABLE_CONTINUOUS -typedef struct { - tmemvectoru - raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE_CONT]; /* 2 bayer lines */ - /* Two more lines for SP raw copy efficiency */ -#ifndef ENABLE_REDUCED_INPUT_BUFFER - /* "Workaround" solution in the case that space needed vmem exceeds the size of the vmem. */ - /* Since in theory this buffer is not needed for IPU 2.2/2.3, */ - /* the workaround solution will not be needed (and the whole buffer) after the code refactoring. */ - tmemvectoru - _raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE_CONT]; /* 2 bayer lines */ -#endif -} input_line_type; -#else /* ENABLE CONTINUOUS == 0 */ -typedef struct { - tmemvectoru - raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE]; /* 2 bayer lines */ -} input_line_type; -#endif /* ENABLE_CONTINUOUS */ - -#endif /*MODE*/ #endif /* _INPUT_BUF_ISP_H_ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/isp_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/isp_types.h index 651fce4a1faa8..6bdf8451e7d45 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/isp_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/isp_types.h @@ -19,39 +19,6 @@ more details. without this extra decl. */ struct ia_css_3a_output; -#if defined(__ISP) -struct isp_uds_config { - int hive_dx; - int hive_dy; - unsigned int hive_woix; - unsigned int hive_bpp; /* gdc_bits_per_pixel */ - unsigned int hive_bci; -}; - -struct s_isp_gdcac_config { - unsigned int nbx; - unsigned int nby; -}; - -/* output.hive.c request information */ -typedef enum { - output_y_channel, - output_c_channel, - OUTPUT_NUM_CHANNELS -} output_channel_type; - -typedef struct s_output_dma_info { - unsigned int cond; /* Condition for transfer */ - output_channel_type channel_type; - dma_channel channel; - unsigned int width_a; - unsigned int width_b; - unsigned int stride; - unsigned int v_delta; /* Offset for v address to do cropping */ - char *x_base; /* X base address */ -} output_dma_info_type; -#endif - /* Input stream formats, these correspond to the MIPI formats and the way * the CSS receiver sends these to the input formatter. * The bit depth of each pixel element is stored in the global variable diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h index d77601eb75ab6..5f271d9ae4854 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h @@ -31,9 +31,7 @@ #include "ia_css_buffer.h" #include "ia_css_binary.h" -#if !defined(__ISP) #include "sh_css_firmware.h" /* not needed/desired on SP/ISP */ -#endif #include "sh_css_legacy.h" #include "sh_css_defs.h" #include "sh_css_uds.h" @@ -765,16 +763,8 @@ struct sh_css_hmm_buffer { * uint64_t does not exist on SP/ISP. * Size of the struct is checked by sp.hive.c. */ -#if !defined(__ISP) CSS_ALIGN(u64 cookie_ptr, 8); /* TODO: check if this alignment is needed */ u64 kernel_ptr; -#else - CSS_ALIGN(struct { u32 a[2]; } cookie_ptr, - 8); /* TODO: check if this alignment is needed */ - struct { - u32 a[2]; - } kernel_ptr; -#endif struct ia_css_time_meas timing_data; clock_value_t isys_eof_clock_tick; }; @@ -970,9 +960,7 @@ sh_css_vprint(const char *fmt, va_list args) issue with the firmware struct/union's. More permanent solution will be to refactor this include. */ -#if !defined(__ISP) -hrt_vaddress -sh_css_params_ddr_address_map(void); +hrt_vaddress sh_css_params_ddr_address_map(void); enum ia_css_err sh_css_params_init(void); @@ -1069,6 +1057,5 @@ ia_css_get_crop_offsets( struct ia_css_pipe *pipe, struct ia_css_frame_info *in_frame); #endif -#endif /* !defined(__ISP) */ #endif /* _SH_CSS_INTERNAL_H_ */ -- 2.30.2