drivers: camera: Ignore resolution errors for CSI
Bhanu Murthy V [Thu, 14 Jul 2016 17:01:06 +0000 (10:01 -0700)]
Ignore only frame height or width short/long errors
from CSI. Resolution mismatch can occur the actual lines
can be inclusive of embedded data lines which application
ignores anyway. Report failure only when the pixel parser
or CIL status is wrong.

Bug 1708456

Change-Id: I96fda6b6802e1497de2d5ca074c416d3b6ea5e40
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1181511
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

drivers/media/platform/tegra/camera/vi2_fops.c

index 1333de3..1f4d407 100644 (file)
@@ -201,12 +201,12 @@ int vi2_channel_error_status(struct tegra_channel *chan)
        int index = 0;
 
        for (index = 0; index < chan->valid_ports; index++) {
+               /* Ignore error based on resolution but reset status */
                val = vi2_channel_csi_read(chan, index,
                                TEGRA_VI_CSI_ERROR_STATUS);
                vi2_channel_csi_write(chan, index,
                                TEGRA_VI_CSI_ERROR_STATUS, val);
-               err |= val;
-               err |= tegra_csi_error(chan->vi->csi, chan->port[index]);
+               err = tegra_csi_error(chan->vi->csi, chan->port[index]);
        }
 
        if (err)