From e35d4427b44217f8a1188e6301ea61bfafb37b4e Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 8 Mar 2017 11:39:38 +0000 Subject: [PATCH] atomisp: __SP is never defined so scrub this ifdef Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- .../css2400/base/circbuf/interface/ia_css_circbuf.h | 9 --------- .../atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c | 13 ------------- .../atomisp2/css2400/hive_isp_css_include/math_support.h | 4 ++-- .../media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h | 4 ++-- .../media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h | 4 ++-- .../pci/atomisp2/css2400/isp/modes/interface/isp_exprs.h | 5 ----- .../pci/atomisp2/css2400/isp/modes/interface/isp_types.h | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css_defs.h | 5 +---- .../media/atomisp/pci/atomisp2/css2400/sh_css_internal.h | 12 ++++-------- 9 files changed, 12 insertions(+), 46 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/interface/ia_css_circbuf.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/interface/ia_css_circbuf.h index 2a38e2b7b8d3..766218ed3649 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/interface/ia_css_circbuf.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/interface/ia_css_circbuf.h @@ -23,11 +23,6 @@ #include #include "ia_css_circbuf_comm.h" #include "ia_css_circbuf_desc.h" -#ifdef __SP -#include "event_handler.sp.h" -/* We should not #define SP_FILE_ID here, because we are in a header file. */ -#include "ia_css_sp_assert_level.sp.h" -#endif /**************************************************************** * @@ -287,11 +282,7 @@ STORAGE_CLASS_INLINE void ia_css_circbuf_write( OP___assert(cb->desc != NULL); /* Cannot continue as the queue is full*/ -#ifdef __SP - SP_ASSERT_FATAL(!ia_css_circbuf_is_full(cb)); -#else assert(!ia_css_circbuf_is_full(cb)); -#endif ia_css_circbuf_elem_cpy(&elem, &cb->elems[cb->desc->end]); diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c index 2493dd249fcb..19bae1610fb6 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c @@ -16,15 +16,6 @@ #include -#ifdef __SP -#include -#include -#ifndef SP_FILE_ID -#define SP_FILE_ID SP_FILE_ID_CIRCBUF /* overrule default in ia_css_sp_assert_level.sp.h */ -#endif -#include -#endif - /********************************************************************** * * Forward declarations. @@ -117,11 +108,7 @@ uint32_t ia_css_circbuf_pop(ia_css_circbuf_t *cb) uint32_t ret; ia_css_circbuf_elem_t elem; -#ifdef __SP - SP_ASSERT_FATAL(!ia_css_circbuf_is_empty(cb)); -#else assert(!ia_css_circbuf_is_empty(cb)); -#endif /* read an element from the buffer */ elem = ia_css_circbuf_read(cb); diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h index d08397d65e96..48d84bc0ad9e 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h @@ -209,13 +209,13 @@ STORAGE_CLASS_INLINE unsigned int ceil_pow2(unsigned int a) #endif /* !defined(PIPE_GENERATION) */ -#if !defined(__ISP) && !defined(__SP) +#if !defined(__ISP) /* * For SP and ISP, SDK provides the definition of OP_std_modadd. * We need it only for host */ #define OP_std_modadd(base, offset, size) ((base+offset)%(size)) -#endif /* !defined(__ISP) && !defined(__SP) */ +#endif /* !defined(__ISP) */ #if !defined(__KERNEL__) #define clamp(a, min_val, max_val) MIN(MAX((a), (min_val)), (max_val)) 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 18f3a13bc1e7..a2a1873aca83 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 @@ -347,7 +347,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) && !defined(__SP) +#if !defined(__ISP) /** Accelerator firmware information. */ struct ia_css_acc_info { @@ -458,7 +458,7 @@ 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) && !defined(__SP) */ +#endif /* !defined(__ISP) */ enum ia_css_sp_sleep_mode { SP_DISABLE_SLEEP_MODE = 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 f0db4ebadc04..26b16f469042 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(__SP) && !defined(__ISP) +#if !defined(__ISP) /** Buffer structure. This is a container structure that enables content * independent buffer queues and access functions. */ @@ -80,6 +80,6 @@ struct ia_css_buffer { void ia_css_dequeue_param_buffers(void); -#endif /* !__SP && !__ISP */ +#endif /* !__ISP */ #endif /* __IA_CSS_BUFFER_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/isp_exprs.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/isp_exprs.h index 2f65d71c36d0..8b59a8caec52 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/isp_exprs.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/modes/interface/isp_exprs.h @@ -146,13 +146,8 @@ more details. ISP_INPUT == IA_CSS_BINARY_INPUT_SENSOR ? 1 : \ isp_online) -#if defined(__SP) -#define ISP_DVS_ENVELOPE_WIDTH (ENABLE_DVS_ENVELOPE ? stage->dvs_envelope.width : 0) -#define ISP_DVS_ENVELOPE_HEIGHT (ENABLE_DVS_ENVELOPE ? stage->dvs_envelope.height : 0) -#else #define ISP_DVS_ENVELOPE_WIDTH 0 #define ISP_DVS_ENVELOPE_HEIGHT 0 -#endif #define _ISP_INPUT_WIDTH_VECS _ISP_VECS(ISP_INPUT_WIDTH) 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 4fa18761f007..37a7d28f6d9f 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 @@ -35,7 +35,7 @@ more details. without this extra decl. */ struct ia_css_3a_output; -#if defined(__ISP) || defined(__SP) +#if defined(__ISP) struct isp_uds_config { int hive_dx; int hive_dy; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_defs.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_defs.h index b24c404c9eed..4072c564f911 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_defs.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_defs.h @@ -15,11 +15,8 @@ #ifndef _SH_CSS_DEFS_H_ #define _SH_CSS_DEFS_H_ -#if !defined(__SP1) #include "isp.h" -#else -#include "system_local.h" /* to get IS_ISP_2500_SYSTEM for SP1*/ -#endif + /*#include "vamem.h"*/ /* Cannot include for VAMEM properties this file is visible on ISP -> pipeline generator */ #include "math_support.h" /* max(), min, etc etc */ 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 c5a87b999ea2..6dbe77caea9a 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 @@ -33,7 +33,7 @@ #include "ia_css_buffer.h" #include "ia_css_binary.h" -#if !defined(__ISP) && !defined(__SP) +#if !defined(__ISP) #include "sh_css_firmware.h" /* not needed/desired on SP/ISP */ #endif #include "sh_css_legacy.h" @@ -557,12 +557,8 @@ struct sh_css_sp_pipeline { uint32_t running; /* needed for pipe termination */ hrt_vaddress sp_stage_addr[SH_CSS_MAX_STAGES]; hrt_vaddress scaler_pp_lut; /* Early bound LUT */ -#ifndef __SP uint32_t dummy; /* stage ptr is only used on sp but lives in this struct; needs cleanup */ -#else - struct sh_css_sp_stage *stage; /* Current stage for this pipeline */ -#endif int32_t num_execs; /* number of times to run if this is an acceleration pipe. */ #if defined(SH_CSS_ENABLE_METADATA) @@ -797,7 +793,7 @@ 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(__SP) && !defined(__ISP) +#if !defined(__ISP) CSS_ALIGN(uint64_t cookie_ptr, 8); /* TODO: check if this alignment is needed */ uint64_t kernel_ptr; #else @@ -1006,7 +1002,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) && !defined(__SP) +#if !defined(__ISP) hrt_vaddress sh_css_params_ddr_address_map(void); @@ -1114,6 +1110,6 @@ ia_css_get_crop_offsets( struct ia_css_pipe *pipe, struct ia_css_frame_info *in_frame); #endif -#endif /* !defined(__ISP) && !defined(__SP) */ +#endif /* !defined(__ISP) */ #endif /* _SH_CSS_INTERNAL_H_ */ -- 2.11.0