summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-04-30 12:12:25 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-20 12:32:19 +0200
commit8d4af3102d648df0d3d8e9ee8a36f7137b2e9a1c (patch)
tree8928e07e5fee0f21b88880fc7eb8751988af73cd
parent9d4fa1a16b28b1d12b0378993d2d48f572a045d9 (diff)
downloadlinux-8d4af3102d648df0d3d8e9ee8a36f7137b2e9a1c.tar.gz
linux-8d4af3102d648df0d3d8e9ee8a36f7137b2e9a1c.tar.bz2
linux-8d4af3102d648df0d3d8e9ee8a36f7137b2e9a1c.zip
media: atomisp: get rid of some broken code
Probably due to some version conflicts while the atomisp code were generated, some things don't build for ISP2401. So, use the ISP2400 variant when available, or get rid of the code that doesn't build. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/staging/media/atomisp/pci/ia_css_types.h4
-rw-r--r--drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c3
-rw-r--r--drivers/staging/media/atomisp/pci/sh_css.c26
-rw-r--r--drivers/staging/media/atomisp/pci/sh_css_params.c9
-rw-r--r--drivers/staging/media/atomisp/pci/sh_css_sp.c9
5 files changed, 6 insertions, 45 deletions
diff --git a/drivers/staging/media/atomisp/pci/ia_css_types.h b/drivers/staging/media/atomisp/pci/ia_css_types.h
index 08e9b24c3d93..d3584756e34e 100644
--- a/drivers/staging/media/atomisp/pci/ia_css_types.h
+++ b/drivers/staging/media/atomisp/pci/ia_css_types.h
@@ -589,10 +589,6 @@ struct ia_css_isp_config {
struct ia_css_output_config
*output_config; /** Main Output Mirroring, flipping */
- /* ISP 2401 */
- struct ia_css_tnr3_kernel_config
- *tnr3_config; /** TNR3 config */
-
struct ia_css_scaler_config
*scaler_config; /** Skylake: scaler config (optional) */
struct ia_css_formats_config
diff --git a/drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c b/drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
index c17e36dac862..da0df52896f3 100644
--- a/drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
+++ b/drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c
@@ -49,9 +49,6 @@
#include "assert_support.h"
#include "print_support.h"
#include "string_support.h"
-#ifdef ISP2401
-#include "ia_css_system_ctrl.h"
-#endif
#include "fifo_monitor.h"
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c
index 76b110431407..46a5e6ed7d29 100644
--- a/drivers/staging/media/atomisp/pci/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/sh_css.c
@@ -1522,7 +1522,6 @@ sh_css_invalidate_shading_tables(struct ia_css_stream *stream)
"sh_css_invalidate_shading_tables() leave: return_void\n");
}
-#ifndef ISP2401
static void
enable_interrupts(enum ia_css_irq_type irq_type)
{
@@ -1564,8 +1563,6 @@ enable_interrupts(enum ia_css_irq_type irq_type)
IA_CSS_LEAVE_PRIVATE("");
}
-#endif
-
static bool sh_css_setup_spctrl_config(const struct ia_css_fw_info *fw,
const char *program,
ia_css_spctrl_cfg *spctrl_cfg)
@@ -1736,11 +1733,8 @@ ia_css_init(const struct ia_css_env *env,
enable = gpio_reg_load(GPIO0_ID, _gpio_block_reg_do_e)
| GPIO_FLASH_PIN_MASK;
sh_css_mmu_set_page_table_base_index(mmu_l1_base);
-#ifndef ISP2401
+
my_css_save.mmu_base = mmu_l1_base;
-#else
- ia_css_save_mmu_base_addr(mmu_l1_base);
-#endif
ia_css_reset_defaults(&my_css);
@@ -1754,13 +1748,8 @@ ia_css_init(const struct ia_css_env *env,
return err;
}
-#ifndef ISP2401
IA_CSS_LOG("init: %d", my_css_save_initialized);
-#else
- ia_css_save_restore_data_init();
-#endif
-#ifndef ISP2401
if (!my_css_save_initialized)
{
my_css_save_initialized = true;
@@ -1769,7 +1758,7 @@ ia_css_init(const struct ia_css_env *env,
sizeof(struct sh_css_stream_seed) * MAX_ACTIVE_STREAMS);
IA_CSS_LOG("init: %d mode=%d", my_css_save_initialized, my_css_save.mode);
}
-#endif
+
mipi_init();
#ifndef ISP2401
@@ -1779,11 +1768,9 @@ ia_css_init(const struct ia_css_env *env,
#endif
my_css.irq_type = irq_type;
-#ifndef ISP2401
+
my_css_save.irq_type = irq_type;
-#else
- ia_css_save_irq_type(irq_type);
-#endif
+
enable_interrupts(my_css.irq_type);
/* configure GPIO to output mode */
@@ -9442,13 +9429,10 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
int i, j;
enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
struct ia_css_metadata_info md_info;
-#ifndef ISP2401
struct ia_css_resolution effective_res;
-#else
#ifdef USE_INPUT_SYSTEM_VERSION_2401
bool aspect_ratio_crop_enabled = false;
#endif
-#endif
IA_CSS_ENTER("num_pipes=%d", num_pipes);
ia_css_debug_dump_stream_config(stream_config, num_pipes);
@@ -9934,6 +9918,8 @@ ia_css_stream_destroy(struct ia_css_stream *stream) {
ia_css_pipeline_is_mapped(stream->last_pipe->pipe_num))
{
#if defined(USE_INPUT_SYSTEM_VERSION_2401)
+ bool free_mpi;
+
for (i = 0; i < stream->num_pipes; i++) {
struct ia_css_pipe *entry = stream->pipes[i];
unsigned int sp_thread_id;
diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c
index 224274c61a3d..baa5259bcf91 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_params.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_params.c
@@ -2708,7 +2708,6 @@ ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
IA_CSS_LEAVE("void");
}
-#ifndef ISP2401
/*
* coding style says the return of "mmgr_NULL" is the error signal
*
@@ -2774,8 +2773,6 @@ static bool reallocate_buffer(
return ret;
}
-#endif
-
struct ia_css_isp_3a_statistics *
ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid)
{
@@ -3143,9 +3140,6 @@ sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
ia_css_sdis_clear_coefficients(&params->dvs_coefs);
params->dis_coef_table_changed = true;
-#ifdef ISP2401
- ia_css_tnr3_set_default_config(&params->tnr3_config);
-#endif
} else {
ia_css_set_xnr3_config(params, &stream_params->xnr3_config);
@@ -3945,9 +3939,6 @@ sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
*/
g_param_buffer_enqueue_count++;
assert(g_param_buffer_enqueue_count < g_param_buffer_dequeue_count + 50);
-#ifdef ISP2401
- ia_css_save_latest_paramset_ptr(pipe, cpy);
-#endif
/*
* Tell the SP which queues are not empty,
* by sending the software event.
diff --git a/drivers/staging/media/atomisp/pci/sh_css_sp.c b/drivers/staging/media/atomisp/pci/sh_css_sp.c
index 5eb45db5c653..e574396ad0f4 100644
--- a/drivers/staging/media/atomisp/pci/sh_css_sp.c
+++ b/drivers/staging/media/atomisp/pci/sh_css_sp.c
@@ -117,10 +117,6 @@ copy_isp_stage_to_sp_stage(void)
*/
sh_css_sp_stage.enable.sdis = sh_css_isp_stage.binary_info.enable.dis;
sh_css_sp_stage.enable.s3a = sh_css_isp_stage.binary_info.enable.s3a;
-#ifdef ISP2401
- sh_css_sp_stage.enable.lace_stats =
- sh_css_isp_stage.binary_info.enable.lace_stats;
-#endif
}
void
@@ -827,11 +823,6 @@ configure_isp_from_args(
const struct sh_css_binary_args *args,
bool two_ppc,
bool deinterleaved) {
-#ifdef ISP2401
- struct ia_css_pipe *pipe = find_pipe_by_num(pipeline->pipe_num);
- const struct ia_css_resolution *res;
-
-#endif
ia_css_fpn_configure(binary, &binary->in_frame_info);
ia_css_crop_configure(binary, &args->delay_frames[0]->info);
ia_css_qplane_configure(pipeline, binary, &binary->in_frame_info);