Skip to content

Commit 27333da

Browse files
committed
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 <[email protected]>
1 parent 58d6ccc commit 27333da

File tree

1 file changed

+10
-5
lines changed
  • drivers/staging/media/atomisp/pci

1 file changed

+10
-5
lines changed

drivers/staging/media/atomisp/pci/sh_css.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,8 @@ ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream)
530530
return bpp;
531531
}
532532

533+
#define GP_ISEL_TPG_MODE 0x90058
534+
533535
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
534536
static enum ia_css_err
535537
sh_css_config_input_network(struct ia_css_stream *stream) {
@@ -580,10 +582,11 @@ sh_css_config_input_network(struct ia_css_stream *stream) {
580582
vblank_cycles = vblank_lines * (width + hblank_cycles);
581583
sh_css_sp_configure_sync_gen(width, height, hblank_cycles,
582584
vblank_cycles);
583-
if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG) {
584-
/* TODO: move define to proper file in tools */
585-
#define GP_ISEL_TPG_MODE 0x90058
586-
ia_css_device_store_uint32(GP_ISEL_TPG_MODE, 0);
585+
if (!atomisp_hw_is_isp2401) {
586+
if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG) {
587+
/* TODO: move define to proper file in tools */
588+
ia_css_device_store_uint32(GP_ISEL_TPG_MODE, 0);
589+
}
587590
}
588591
}
589592
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
@@ -1022,11 +1025,13 @@ static bool sh_css_translate_stream_cfg_to_isys_stream_descr(
10221025
*
10231026
* Only 2401 relevant ??
10241027
*/
1028+
#if 0 // FIXME: NOT USED on Yocto Aero
10251029
isys_stream_descr->polling_mode
10261030
= early_polling ? INPUT_SYSTEM_POLL_ON_CAPTURE_REQUEST
10271031
: INPUT_SYSTEM_POLL_ON_WAIT_FOR_FRAME;
10281032
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
10291033
"sh_css_translate_stream_cfg_to_isys_stream_descr() leave:\n");
1034+
#endif
10301035

10311036
return rc;
10321037
}
@@ -1464,7 +1469,7 @@ static void start_pipe(
14641469

14651470
assert(me); /* all callers are in this file and call with non null argument */
14661471

1467-
if (atomisp_hw_is_isp2401) {
1472+
if (!atomisp_hw_is_isp2401) {
14681473
coord = &me->config.internal_frame_origin_bqs_on_sctbl;
14691474
params = me->stream->isp_params_configs;
14701475
}

0 commit comments

Comments
 (0)