Commit 27333dad authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: adjust some code at sh_css that could be broken

When checking sh_css.c against the Yocto Aero's version, it can
be noticed that some isp2401 dependencies may have been taken
wrongly.

Change the code to work like the Yocto Aero, as this driver
was tested in the past with an ISP2401 device.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 58d6ccc2
...@@ -530,6 +530,8 @@ ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream) ...@@ -530,6 +530,8 @@ ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream)
return bpp; return bpp;
} }
#define GP_ISEL_TPG_MODE 0x90058
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2) #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
static enum ia_css_err static enum ia_css_err
sh_css_config_input_network(struct ia_css_stream *stream) { sh_css_config_input_network(struct ia_css_stream *stream) {
...@@ -580,12 +582,13 @@ sh_css_config_input_network(struct ia_css_stream *stream) { ...@@ -580,12 +582,13 @@ sh_css_config_input_network(struct ia_css_stream *stream) {
vblank_cycles = vblank_lines * (width + hblank_cycles); vblank_cycles = vblank_lines * (width + hblank_cycles);
sh_css_sp_configure_sync_gen(width, height, hblank_cycles, sh_css_sp_configure_sync_gen(width, height, hblank_cycles,
vblank_cycles); vblank_cycles);
if (!atomisp_hw_is_isp2401) {
if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG) { if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG) {
/* TODO: move define to proper file in tools */ /* TODO: move define to proper file in tools */
#define GP_ISEL_TPG_MODE 0x90058
ia_css_device_store_uint32(GP_ISEL_TPG_MODE, 0); ia_css_device_store_uint32(GP_ISEL_TPG_MODE, 0);
} }
} }
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
"sh_css_config_input_network() leave:\n"); "sh_css_config_input_network() leave:\n");
return IA_CSS_SUCCESS; return IA_CSS_SUCCESS;
...@@ -1022,11 +1025,13 @@ static bool sh_css_translate_stream_cfg_to_isys_stream_descr( ...@@ -1022,11 +1025,13 @@ static bool sh_css_translate_stream_cfg_to_isys_stream_descr(
* *
* Only 2401 relevant ?? * Only 2401 relevant ??
*/ */
#if 0 // FIXME: NOT USED on Yocto Aero
isys_stream_descr->polling_mode isys_stream_descr->polling_mode
= early_polling ? INPUT_SYSTEM_POLL_ON_CAPTURE_REQUEST = early_polling ? INPUT_SYSTEM_POLL_ON_CAPTURE_REQUEST
: INPUT_SYSTEM_POLL_ON_WAIT_FOR_FRAME; : INPUT_SYSTEM_POLL_ON_WAIT_FOR_FRAME;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
"sh_css_translate_stream_cfg_to_isys_stream_descr() leave:\n"); "sh_css_translate_stream_cfg_to_isys_stream_descr() leave:\n");
#endif
return rc; return rc;
} }
...@@ -1464,7 +1469,7 @@ static void start_pipe( ...@@ -1464,7 +1469,7 @@ static void start_pipe(
assert(me); /* all callers are in this file and call with non null argument */ assert(me); /* all callers are in this file and call with non null argument */
if (atomisp_hw_is_isp2401) { if (!atomisp_hw_is_isp2401) {
coord = &me->config.internal_frame_origin_bqs_on_sctbl; coord = &me->config.internal_frame_origin_bqs_on_sctbl;
params = me->stream->isp_params_configs; params = me->stream->isp_params_configs;
} }
......
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