Commit 8d4af310 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

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: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 9d4fa1a1
......@@ -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
......
......@@ -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"
......
......@@ -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,12 +9429,9 @@ 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);
......@@ -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;
......
......@@ -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.
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment