diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-20 07:28:50 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-20 15:02:58 +0200 |
commit | 27333dadef57ad36199945fa47f4206d60a4866c (patch) | |
tree | c855bcfc329d949eb83258b584d8362f1146edd9 /drivers/staging | |
parent | 58d6ccc264ed527377434e53ffadfdebed6cf915 (diff) |
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: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/atomisp/pci/sh_css.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index 05b3565ed5a3..d77432254a2c 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -530,6 +530,8 @@ ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream) return bpp; } +#define GP_ISEL_TPG_MODE 0x90058 + #if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2) static enum ia_css_err sh_css_config_input_network(struct ia_css_stream *stream) { @@ -580,10 +582,11 @@ sh_css_config_input_network(struct ia_css_stream *stream) { vblank_cycles = vblank_lines * (width + hblank_cycles); sh_css_sp_configure_sync_gen(width, height, hblank_cycles, vblank_cycles); - if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG) { - /* TODO: move define to proper file in tools */ -#define GP_ISEL_TPG_MODE 0x90058 - ia_css_device_store_uint32(GP_ISEL_TPG_MODE, 0); + if (!atomisp_hw_is_isp2401) { + if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG) { + /* TODO: move define to proper file in tools */ + ia_css_device_store_uint32(GP_ISEL_TPG_MODE, 0); + } } } ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, @@ -1022,11 +1025,13 @@ static bool sh_css_translate_stream_cfg_to_isys_stream_descr( * * Only 2401 relevant ?? */ +#if 0 // FIXME: NOT USED on Yocto Aero isys_stream_descr->polling_mode = early_polling ? INPUT_SYSTEM_POLL_ON_CAPTURE_REQUEST : INPUT_SYSTEM_POLL_ON_WAIT_FOR_FRAME; ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "sh_css_translate_stream_cfg_to_isys_stream_descr() leave:\n"); +#endif return rc; } @@ -1464,7 +1469,7 @@ static void start_pipe( 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; params = me->stream->isp_params_configs; } |