Skip to content

Commit

Permalink
atomisp: __SP is never defined so scrub this ifdef
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Mar 8, 2017
1 parent 0d93fe7 commit e35d442
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
#include <platform_support.h>
#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

/****************************************************************
*
Expand Down Expand Up @@ -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]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@

#include <assert_support.h>

#ifdef __SP
#include <hive_isp_css_sp_api_modified.h>
#include <ia_css_sp_file_id.sp.h>
#ifndef SP_FILE_ID
#define SP_FILE_ID SP_FILE_ID_CIRCBUF /* overrule default in ia_css_sp_assert_level.sp.h */
#endif
#include <ia_css_sp_assert_level.sp.h>
#endif

/**********************************************************************
*
* Forward declarations.
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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 */
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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_ */

0 comments on commit e35d442

Please sign in to comment.