]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
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 ad5e1c860e01f03e3a693cc588c9b581b4efea43..4a975b54a97768f4701565f5be880993ddd56356 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 4752f7701c04153baae91bd3454a67a01c5584b0..fb3c6a24322a8f566ceab247e5ab500599374457 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 416b40b8046c1d84e06b601b77c2328a325a7e1a..80136156ceafac4e8d71f8d7c688bf5213632da4 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 c16312761d7dbd0a14740f2c9b35541921156bda..af419e356e6da30dc866e2ca49e4123628bd1f21 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 8bf5344df684ac4d2d4d7935a4abf5a70c8740b2..b9610f1ed820ae3907b1aec48fdbdae514fef48b 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 2667fca81a7632a5d1a940635f15fbb15f9d7d25..a24d82dfca638b10bb1ff4dae100973082e78a94 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