ENGR00303663 mxc v4l2 capture: Don't return error if we cannot get mipi csi2
authorLiu Ying <Ying.Liu@freescale.com>
Mon, 17 Mar 2014 03:28:53 +0000 (11:28 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:57 +0000 (10:06 +0200)
The mipi csi2 code is ugly present in the capture pipeline setup/disable
routions with '#ifdef CONFIG_MXC_MIPI_CSI2/#endif' protected.  Whenever
it finds mipi_csi2_info is not gotten correctly, it will return error to
callers.  This breaks the normally routines in which mipi csi2 is not used
and mipi csi2 driver is disabled in its devicetree node(but with the
Kconfig CONFIG_MXC_MIPI_CSI2 defined).  A real example is the capture
feature on the MX6 Sabreauto platforms.  We have only parallel CSI input
on it and the mipi csi2 driver is disabled in its devicetree node but with
the Kconfig CONFIG_MXC_MIPI_CSI2 defined.  So, a reasonable choice at present
is not to return error if mipi_csi2_info cannot be gotten, though we could
eventually re-organize the capture code for a better total solution in the
future.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 8133b7fd26e8b068fa8ab9cd62eae090c76080be)

drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.c
drivers/media/platform/mxc/capture/ipu_csi_enc.c
drivers/media/platform/mxc/capture/ipu_fg_overlay_sdc.c
drivers/media/platform/mxc/capture/ipu_prp_enc.c
drivers/media/platform/mxc/capture/ipu_prp_vf_sdc.c
drivers/media/platform/mxc/capture/ipu_prp_vf_sdc_bg.c

index ad5e1c8..4a975b5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
  */
 
 /*
@@ -189,10 +189,6 @@ static int csi_enc_setup(cam_data *cam)
                        params.csi_mem.mipi_vc = 0;
                        params.csi_mem.mipi_id = 0;
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif
 
@@ -411,10 +407,6 @@ static int bg_overlay_stop(void *private)
                                && cam->csi == csi_id)
                                mipi_csi2_pixelclk_disable(mipi_csi2_info);
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif
 
index 4752f77..fb3c6a2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2009-2014 Freescale Semiconductor, Inc. All Rights Reserved.
  */
 
 /*
@@ -157,10 +157,6 @@ static int csi_enc_setup(cam_data *cam)
                        params.csi_mem.mipi_vc = 0;
                        params.csi_mem.mipi_id = 0;
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif
 
@@ -309,10 +305,6 @@ static int csi_enc_disabling_tasks(void *private)
                                && cam->csi == csi_id)
                                mipi_csi2_pixelclk_disable(mipi_csi2_info);
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif
 
index 416b40b..8013615 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
  */
 /* * The code contained herein is licensed under the GNU General Public
  * License. You may obtain a copy of the GNU General Public License
@@ -195,10 +195,6 @@ static int csi_enc_setup(cam_data *cam)
                        params.csi_mem.mipi_vc = 0;
                        params.csi_mem.mipi_id = 0;
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif
 
@@ -508,10 +504,6 @@ static int foreground_stop(void *private)
                                && cam->csi == csi_id)
                                mipi_csi2_pixelclk_disable(mipi_csi2_info);
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif
 
index c163127..af419e3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
  */
 
 /*
@@ -161,10 +161,6 @@ static int prp_enc_setup(cam_data *cam)
                        enc.csi_prp_enc_mem.mipi_vc = 0;
                        enc.csi_prp_enc_mem.mipi_id = 0;
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif
 
@@ -471,10 +467,6 @@ static int prp_enc_disabling_tasks(void *private)
                                && cam->csi == csi_id)
                                mipi_csi2_pixelclk_disable(mipi_csi2_info);
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif
 
index 8bf5344..b9610f1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
  */
 /* * The code contained herein is licensed under the GNU General Public
  * License. You may obtain a copy of the GNU General Public License
@@ -196,10 +196,6 @@ static int prpvf_start(void *private)
                        vf.csi_prp_vf_mem.mipi_vc = 0;
                        vf.csi_prp_vf_mem.mipi_id = 0;
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif
 
@@ -458,10 +454,6 @@ static int prpvf_stop(void *private)
                                && cam->csi == csi_id)
                                mipi_csi2_pixelclk_disable(mipi_csi2_info);
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif
 
index 2667fca..a24d82d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
  */
 
 /*
@@ -181,10 +181,6 @@ static int prpvf_start(void *private)
                        vf.csi_prp_vf_mem.mipi_vc = 0;
                        vf.csi_prp_vf_mem.mipi_id = 0;
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif
 
@@ -387,10 +383,6 @@ static int prpvf_stop(void *private)
                                && cam->csi == csi_id)
                                mipi_csi2_pixelclk_disable(mipi_csi2_info);
                }
-       } else {
-               printk(KERN_ERR "%s() in %s: Fail to get mipi_csi2_info!\n",
-                      __func__, __FILE__);
-               return -EPERM;
        }
 #endif