summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime')
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h88
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c3
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c8
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h9
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h24
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c7
7 files changed, 21 insertions, 120 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h
index 5a58abe..732e49a 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/interface/ia_css_binary.h
@@ -93,17 +93,6 @@ struct ia_css_cas_binary_descr {
bool *is_output_stage;
};
-#define IA_CSS_DEFAULT_CAS_BINARY_DESCR \
-{ \
- 0, \
- 0, \
- NULL, \
- NULL, \
- NULL, \
- NULL, \
- NULL, \
-}
-
struct ia_css_binary_descr {
int mode;
bool online;
@@ -171,80 +160,15 @@ struct ia_css_binary {
struct ia_css_isp_param_css_segments css_params;
};
-#ifdef ISP2401
-
#define IA_CSS_BINARY_DEFAULT_SETTINGS \
-{ \
- NULL, \
- IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY, \
- IA_CSS_BINARY_DEFAULT_FRAME_INFO, \
- IA_CSS_BINARY_DEFAULT_FRAME_INFO, \
- {IA_CSS_BINARY_DEFAULT_FRAME_INFO}, \
- { 0, 0},/* effective_in_frame_res */ \
- IA_CSS_BINARY_DEFAULT_FRAME_INFO, \
- 0, /* input_buf_vectors */ \
- 0, /* deci_factor_log2 */ \
- 0, /* vf_downscale_log2 */ \
- 0, /* s3atbl_width */ \
- 0, /* s3atbl_height */ \
- 0, /* s3atbl_isp_width */ \
- 0, /* s3atbl_isp_height */ \
- 0, /* morph_tbl_width */ \
- 0, /* morph_tbl_aligned_width */ \
- 0, /* morph_tbl_height */ \
- 0, /* sctbl_width_per_color */ \
- 0, /* sctbl_aligned_width_per_color */ \
- 0, /* sctbl_height */ \
- 0, /* sctbl_legacy_width_per_color */ \
- 0, /* sctbl_legacy_height */ \
- IA_CSS_DEFAULT_SDIS_INFO, /* dis */ \
- { 0, 0},/* dvs_envelope_info */ \
- false, /* online */ \
- 0, /* uds_xc */ \
- 0, /* uds_yc */ \
- 0, /* left_padding */ \
- DEFAULT_BINARY_METRICS, /* metrics */ \
- IA_CSS_DEFAULT_ISP_MEM_PARAMS, /* mem_params */ \
- IA_CSS_DEFAULT_ISP_CSS_PARAMS, /* css_params */ \
+(struct ia_css_binary) { \
+ .input_format = IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY, \
+ .in_frame_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO, \
+ .internal_frame_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO, \
+ .out_frame_info = {IA_CSS_BINARY_DEFAULT_FRAME_INFO}, \
+ .vf_frame_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO, \
}
-#else
-
-#define IA_CSS_BINARY_DEFAULT_SETTINGS \
-{ \
- NULL, \
- IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY, \
- IA_CSS_BINARY_DEFAULT_FRAME_INFO, \
- IA_CSS_BINARY_DEFAULT_FRAME_INFO, \
- {IA_CSS_BINARY_DEFAULT_FRAME_INFO}, \
- { 0, 0},/* effective_in_frame_res */ \
- IA_CSS_BINARY_DEFAULT_FRAME_INFO, \
- 0, /* input_buf_vectors */ \
- 0, /* deci_factor_log2 */ \
- 0, /* vf_downscale_log2 */ \
- 0, /* s3atbl_width */ \
- 0, /* s3atbl_height */ \
- 0, /* s3atbl_isp_width */ \
- 0, /* s3atbl_isp_height */ \
- 0, /* morph_tbl_width */ \
- 0, /* morph_tbl_aligned_width */ \
- 0, /* morph_tbl_height */ \
- 0, /* sctbl_width_per_color */ \
- 0, /* sctbl_aligned_width_per_color */ \
- 0, /* sctbl_height */ \
- IA_CSS_DEFAULT_SDIS_INFO, /* dis */ \
- { 0, 0},/* dvs_envelope_info */ \
- false, /* online */ \
- 0, /* uds_xc */ \
- 0, /* uds_yc */ \
- 0, /* left_padding */ \
- DEFAULT_BINARY_METRICS, /* metrics */ \
- IA_CSS_DEFAULT_ISP_MEM_PARAMS, /* mem_params */ \
- IA_CSS_DEFAULT_ISP_CSS_PARAMS, /* css_params */ \
-}
-
-#endif
-
enum ia_css_err
ia_css_binary_init_infos(void);
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c
index 295e070..a0f0e90 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c
@@ -490,7 +490,6 @@ ia_css_binary_get_shading_info_type_1(const struct ia_css_binary *binary, /* [in
struct sh_css_shading_table_bayer_origin_compute_results res;
#else
struct sh_css_binary_sc_requirements scr;
- struct ia_css_shading_info default_shading_info_type_1 = DEFAULT_SHADING_INFO_TYPE_1;
#endif
#ifndef ISP2401
@@ -542,7 +541,7 @@ ia_css_binary_get_shading_info_type_1(const struct ia_css_binary *binary, /* [in
&res);
if (err != IA_CSS_SUCCESS)
#else
- *shading_info = default_shading_info_type_1;
+ *shading_info = DEFAULT_SHADING_INFO_TYPE_1;
err = sh_css_binary_get_sc_requirements(binary, required_bds_factor, stream_config, &scr);
if (err != IA_CSS_SUCCESS) {
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c
index f22d73b..6039590 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c
@@ -2858,13 +2858,7 @@ ia_css_debug_pipe_graph_dump_stage(
if (l && enable_info[l-1] == ',')
enable_info[--l] = '\0';
- if (l <= ENABLE_LINE_MAX_LENGTH) {
- /* It fits on one line, copy string and init */
- /* other helper strings with empty string */
- strcpy_s(enable_info,
- sizeof(enable_info),
- ei);
- } else {
+ if (l > ENABLE_LINE_MAX_LENGTH) {
/* Too big for one line, find last comma */
p = ENABLE_LINE_MAX_LENGTH;
while (ei[p] != ',')
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c
index 5faa89a..7562bea 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c
@@ -196,7 +196,7 @@ enum ia_css_err ia_css_frame_map(struct ia_css_frame **frame,
attribute, context);
if (me->data == mmgr_NULL)
err = IA_CSS_ERR_INVALID_ARGUMENTS;
- };
+ }
if (err != IA_CSS_SUCCESS) {
sh_css_free(me);
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h
index fa3f093..9d11179 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/interface/ia_css_isp_param_types.h
@@ -94,14 +94,5 @@ union ia_css_all_memory_offsets {
} array[IA_CSS_NUM_PARAM_CLASSES];
};
-#define IA_CSS_DEFAULT_ISP_MEM_PARAMS \
- { { { { NULL, 0 } } } }
-
-#define IA_CSS_DEFAULT_ISP_CSS_PARAMS \
- { { { { 0, 0 } } } }
-
-#define IA_CSS_DEFAULT_ISP_ISP_PARAMS \
- { { { { 0, 0 } } } }
-
#endif /* _IA_CSS_ISP_PARAM_TYPES_H_ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h
index e64936e..85ed7db 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h
@@ -74,21 +74,15 @@ struct ia_css_pipeline {
};
#define DEFAULT_PIPELINE \
-{ \
- IA_CSS_PIPE_ID_PREVIEW, /* pipe_id */ \
- 0, /* pipe_num */ \
- false, /* stop_requested */ \
- NULL, /* stages */ \
- NULL, /* current_stage */ \
- 0, /* num_stages */ \
- DEFAULT_FRAME, /* in_frame */ \
- {DEFAULT_FRAME}, /* out_frame */ \
- {DEFAULT_FRAME}, /* vf_frame */ \
- IA_CSS_FRAME_DELAY_1, /* frame_delay */ \
- 0, /* inout_port_config */ \
- -1, /* num_execs */ \
- true, /* acquire_isp_each_stage */\
- QOS_INVALID /* pipe_qos_config */\
+(struct ia_css_pipeline) { \
+ .pipe_id = IA_CSS_PIPE_ID_PREVIEW, \
+ .in_frame = DEFAULT_FRAME, \
+ .out_frame = {DEFAULT_FRAME}, \
+ .vf_frame = {DEFAULT_FRAME}, \
+ .dvs_frame_delay = IA_CSS_FRAME_DELAY_1, \
+ .num_execs = -1, \
+ .acquire_isp_each_stage = true, \
+ .pipe_qos_config = QOS_INVALID \
}
/* Stage descriptor used to create a new stage in the pipeline */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c
index 8f93d29..81a50c7 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c
@@ -692,17 +692,16 @@ static void pipeline_init_defaults(
unsigned int pipe_num,
unsigned int dvs_frame_delay)
{
- struct ia_css_frame init_frame = DEFAULT_FRAME;
unsigned int i;
pipeline->pipe_id = pipe_id;
pipeline->stages = NULL;
pipeline->stop_requested = false;
pipeline->current_stage = NULL;
- pipeline->in_frame = init_frame;
+ pipeline->in_frame = DEFAULT_FRAME;
for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
- pipeline->out_frame[i] = init_frame;
- pipeline->vf_frame[i] = init_frame;
+ pipeline->out_frame[i] = DEFAULT_FRAME;
+ pipeline->vf_frame[i] = DEFAULT_FRAME;
}
pipeline->num_execs = -1;
pipeline->acquire_isp_each_stage = true;
OpenPOWER on IntegriCloud