This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: atomisp: adjust some code at sh_css that could be broken
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Wed May 20 07:28:50 2020 +0200

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]>

 drivers/staging/media/atomisp/pci/sh_css.c | 15 ++++++++++-----
 1 file 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;
        }

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to