From a4fda0058007867361bd0df664ad9a449660110c Mon Sep 17 00:00:00 2001 From: E V Ravi Date: Mon, 4 Nov 2019 17:38:32 +0530 Subject: [PATCH] msm: ais: fix camif_cfg programming Fixed Camera configuration register. Register expects width and height starting from 0 while it was programmed starting from 1. This fixes CAMIF erorrs we experience as the programmed size is always 1 more pixel and line. Change-Id: I73f1f5040820b71d317c317f8f5c6e3ff19db6e6 Signed-off-by: E V Ravi --- drivers/media/platform/msm/ais/isp/msm_isp47.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/msm/ais/isp/msm_isp47.c b/drivers/media/platform/msm/ais/isp/msm_isp47.c index 1ddcab3ed331..666f1916eaa9 100644 --- a/drivers/media/platform/msm/ais/isp/msm_isp47.c +++ b/drivers/media/platform/msm/ais/isp/msm_isp47.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1323,8 +1323,8 @@ void msm_vfe47_cfg_camif(struct vfe_device *vfe_dev, first_line = camif_cfg->first_line; last_line = camif_cfg->last_line; - msm_camera_io_w((camif_cfg->lines_per_frame) << 16 | - (camif_cfg->pixels_per_line), vfe_dev->vfe_base + 0x484); + msm_camera_io_w((camif_cfg->lines_per_frame - 1) << 16 | + (camif_cfg->pixels_per_line - 1), vfe_dev->vfe_base + 0x484); if (bus_sub_en) { val = msm_camera_io_r(vfe_dev->vfe_base + 0x47C); val &= 0xFFFFFFDF;