[{"id":18281,"web_url":"https://patchwork.libcamera.org/comment/18281/","msgid":"<YPqtC0KITMbB2I4F@pendragon.ideasonboard.com>","date":"2021-07-23T11:50:35","subject":"Re: [libcamera-devel] [PATCH 1/2] media: imx258: Rectify mismatch\n\tof VTS value","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nThank you for the patch.\n\n(Expanding the CC list)\n\nOn Fri, Jul 23, 2021 at 04:52:32PM +0530, Umang Jain wrote:\n> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> The frame_length_lines (0x0340) registers are hard-coded as follows:\n> \n> - 4208x3118\n>   frame_length_lines = 0x0c50\n> \n> - 2104x1560\n>   frame_length_lines = 0x0638\n> \n> - 1048x780\n>   frame_length_lines = 0x034c\n> \n> The driver exposes the V4L2_CID_VBLANK control in read-only mode and\n> sets its value to vts_def - height, where vts_def is a mode-dependent\n> value coming from the supported_modes array. It is set using one of\n> the following macros defined in the driver:\n> \n>   #define IMX258_VTS_30FPS                0x0c98\n>   #define IMX258_VTS_30FPS_2K             0x0638\n>   #define IMX258_VTS_30FPS_VGA            0x034c\n> \n> There's a clear mismatch in the value for the full resolution mode i.e.\n> IMX258_VTS_30FPS. Fix it by rectifying the macro with the value set for\n> the frame_length_lines register as stated above.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  drivers/media/i2c/imx258.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c\n> index 7ab9e5f9f267..4e695096e5d0 100644\n> --- a/drivers/media/i2c/imx258.c\n> +++ b/drivers/media/i2c/imx258.c\n> @@ -23,7 +23,7 @@\n>  #define IMX258_CHIP_ID\t\t\t0x0258\n>  \n>  /* V_TIMING internal */\n> -#define IMX258_VTS_30FPS\t\t0x0c98\n> +#define IMX258_VTS_30FPS\t\t0x0c50\n>  #define IMX258_VTS_30FPS_2K\t\t0x0638\n>  #define IMX258_VTS_30FPS_VGA\t\t0x034c\n>  #define IMX258_VTS_MAX\t\t\t0xffff","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 1D865C322C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Jul 2021 11:50:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7C553687A4;\n\tFri, 23 Jul 2021 13:50:39 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7303668536\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Jul 2021 13:50:38 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DA5043F2;\n\tFri, 23 Jul 2021 13:50:37 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"qqpE66nH\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1627041038;\n\tbh=oaGp71Pn82ESFJ7wM7lQkJJvoJlCzgBAHG8xXSC/pg4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=qqpE66nHHl6NAsWotnmcEhFhbY3ccUWHSS1bM+0uo8FOzDJpNuORda4tRu3oXKAkY\n\tBovzSZratZ5Owwl1VowYXIscpEAoABpG/066muPYDTYWZknzG6YTuouyl5a8hk8n3k\n\tC0vBhL0WSvbU1Gt8QnXLGjyLvNngEeQAPo0qSP0M=","Date":"Fri, 23 Jul 2021 14:50:35 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<YPqtC0KITMbB2I4F@pendragon.ideasonboard.com>","References":"<20210723112233.1361319-1-umang.jain@ideasonboard.com>\n\t<20210723112233.1361319-2-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210723112233.1361319-2-umang.jain@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/2] media: imx258: Rectify mismatch\n\tof VTS value","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"Krzysztof Kozlowski <krzk@kernel.org>,\n\tlibcamera-devel@lists.libcamera.org, \n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tBingbu Cao <bingbu.cao@intel.com>, linux-media@vger.kernel.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18335,"web_url":"https://patchwork.libcamera.org/comment/18335/","msgid":"<e543e0fe-3a2c-f3c9-9543-24e576cb32e8@linux.intel.com>","date":"2021-07-26T02:20:31","subject":"Re: [libcamera-devel] [PATCH 1/2] media: imx258: Rectify mismatch\n\tof VTS value","submitter":{"id":92,"url":"https://patchwork.libcamera.org/api/people/92/","name":"Bingbu Cao","email":"bingbu.cao@linux.intel.com"},"content":"Umang and Laurent,\n\nI just checked the spec, 0xc98 should be the initial value not for 4208x3118, the patch\nlooks good to me though I am not working on that anymore.\n\nReviewed-by: Bingbu Cao <bingbu.cao@intel.com>\n\nOn 7/23/21 7:50 PM, Laurent Pinchart wrote:\n> Hi Umang,\n> \n> Thank you for the patch.\n> \n> (Expanding the CC list)\n> \n> On Fri, Jul 23, 2021 at 04:52:32PM +0530, Umang Jain wrote:\n>> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>\n>> The frame_length_lines (0x0340) registers are hard-coded as follows:\n>>\n>> - 4208x3118\n>>   frame_length_lines = 0x0c50\n>>\n>> - 2104x1560\n>>   frame_length_lines = 0x0638\n>>\n>> - 1048x780\n>>   frame_length_lines = 0x034c\n>>\n>> The driver exposes the V4L2_CID_VBLANK control in read-only mode and\n>> sets its value to vts_def - height, where vts_def is a mode-dependent\n>> value coming from the supported_modes array. It is set using one of\n>> the following macros defined in the driver:\n>>\n>>   #define IMX258_VTS_30FPS                0x0c98\n>>   #define IMX258_VTS_30FPS_2K             0x0638\n>>   #define IMX258_VTS_30FPS_VGA            0x034c\n>>\n>> There's a clear mismatch in the value for the full resolution mode i.e.\n>> IMX258_VTS_30FPS. Fix it by rectifying the macro with the value set for\n>> the frame_length_lines register as stated above.\n>>\n>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n>> ---\n>>  drivers/media/i2c/imx258.c | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c\n>> index 7ab9e5f9f267..4e695096e5d0 100644\n>> --- a/drivers/media/i2c/imx258.c\n>> +++ b/drivers/media/i2c/imx258.c\n>> @@ -23,7 +23,7 @@\n>>  #define IMX258_CHIP_ID\t\t\t0x0258\n>>  \n>>  /* V_TIMING internal */\n>> -#define IMX258_VTS_30FPS\t\t0x0c98\n>> +#define IMX258_VTS_30FPS\t\t0x0c50\n>>  #define IMX258_VTS_30FPS_2K\t\t0x0638\n>>  #define IMX258_VTS_30FPS_VGA\t\t0x034c\n>>  #define IMX258_VTS_MAX\t\t\t0xffff\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9F775C0109\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Jul 2021 02:22:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 05132687B3;\n\tMon, 26 Jul 2021 04:22:27 +0200 (CEST)","from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B5F5468536\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Jul 2021 04:22:25 +0200 (CEST)","from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; \n\t25 Jul 2021 19:22:23 -0700","from ipu5-build.bj.intel.com (HELO [10.238.232.202])\n\t([10.238.232.202])\n\tby fmsmga007.fm.intel.com with ESMTP; 25 Jul 2021 19:22:20 -0700"],"X-IronPort-AV":["E=McAfee;i=\"6200,9189,10056\"; a=\"212141716\"","E=Sophos;i=\"5.84,269,1620716400\"; d=\"scan'208\";a=\"212141716\"","E=Sophos;i=\"5.84,269,1620716400\"; d=\"scan'208\";a=\"436588592\""],"X-ExtLoop1":"1","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tUmang Jain <umang.jain@ideasonboard.com>","References":"<20210723112233.1361319-1-umang.jain@ideasonboard.com>\n\t<20210723112233.1361319-2-umang.jain@ideasonboard.com>\n\t<YPqtC0KITMbB2I4F@pendragon.ideasonboard.com>","From":"Bingbu Cao <bingbu.cao@linux.intel.com>","Message-ID":"<e543e0fe-3a2c-f3c9-9543-24e576cb32e8@linux.intel.com>","Date":"Mon, 26 Jul 2021 10:20:31 +0800","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<YPqtC0KITMbB2I4F@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=windows-1252","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 1/2] media: imx258: Rectify mismatch\n\tof VTS value","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"Krzysztof Kozlowski <krzk@kernel.org>,\n\tlibcamera-devel@lists.libcamera.org, \n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tBingbu Cao <bingbu.cao@intel.com>, linux-media@vger.kernel.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]