Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1702462pxb; Thu, 16 Sep 2021 13:24:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybUW4Y0G9B9cOOlsgyoVm3E/I9/LQDNT9PfWAOZddlppdgkMPvCaO+ATPhcfUMM2sU+uNY X-Received: by 2002:a05:6402:14c4:: with SMTP id f4mr8720730edx.358.1631823844999; Thu, 16 Sep 2021 13:24:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631823844; cv=none; d=google.com; s=arc-20160816; b=rx/R0Pt+UJMWKAqWfkIDWn8jsQQsE7OjBx1Q7gf8vuAjNLt73XuW45sHzm8Rw93yOf ryHTEq/36WIbPC2P9szq6BgVMzNxYACLQMzVA4iIniw2yxu58bHSDCuhnDQ/CIK8ETjm CeAw5vg8QmwCIQCSkTFLXYoDIte937irD9gvohJtB6YypQQXNAaXeM97QZCNWgPTBrU5 Zs0/1rLVkzsQa5oeT7I7wiC9zAyW90uepH4etrJ0dzGLUg8j65q++r6/TRqHPMWvNdUo B5q5yQGS93t8/8urGv5JPFZfJpOw9WzdnbHa17n0qxmyAoViCmeH1FeYg50Ob4uzIil8 LKSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QvxLAk8NqfhaaOheLpMYXtxg8OldGzt5JAUgmS+UewM=; b=YKylNRbEbM+a+So7N/h5+X30jfTySSvrbsL7JbJmbPpCXq+3fyasnu8CrkSoMHEZqs tl1yBDgzT7qtDzY20gXyk0IRsqBkoTGGAV6LvnxwcjP90jyr6+sia9IVD6oe/RGCrHQZ yEvCrmduKj5F2TvTsfQ8IUF7c7TYEah2nMOOYwtfFllONpn6OT2hKHKgdKoCFcux0eky j0gl91V5H10aF+vCGN/yl3NKhBry0z6XB4kUkdjmMZfcPKWoGaE+jj386wkEyrNUYFR9 n6jstaHIGkbemY66YRvoaQwQgTHDhfqmcYb6OJd/vgdcSKlIUALQZ8mrwYVjEmVbMLFS W0kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Co7UIWoT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bf3si4790790edb.237.2021.09.16.13.23.38; Thu, 16 Sep 2021 13:24:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Co7UIWoT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232460AbhIPQZr (ORCPT + 99 others); Thu, 16 Sep 2021 12:25:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:55108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240845AbhIPQR2 (ORCPT ); Thu, 16 Sep 2021 12:17:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7B82E6135D; Thu, 16 Sep 2021 16:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808759; bh=WGAUroMp2YiF3aYdHx/k1oTKR3AUnrywzRgf7Y2IgZc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Co7UIWoTCUSttfRb/Wdljk9BTWKDIEj72n3bbklaqFgozkuj+nukCV5OX3b2noHFe Q/OohCls3m9PpTa1WBMgLwBoT8D7UjibdKtGuI1771kPdn5PYz1F4oWV9qnv8prPu7 47mpKvYY3Ujsul4s5uQ2qkmVZmFuTWKTxYNb3a1g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laurent Pinchart , Umang Jain , Bingbu Cao , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.10 179/306] media: imx258: Rectify mismatch of VTS value Date: Thu, 16 Sep 2021 17:58:44 +0200 Message-Id: <20210916155800.188056845@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Laurent Pinchart [ Upstream commit 51f93add3669f1b1f540de1cf397815afbd4c756 ] The frame_length_lines (0x0340) registers are hard-coded as follows: - 4208x3118 frame_length_lines = 0x0c50 - 2104x1560 frame_length_lines = 0x0638 - 1048x780 frame_length_lines = 0x034c The driver exposes the V4L2_CID_VBLANK control in read-only mode and sets its value to vts_def - height, where vts_def is a mode-dependent value coming from the supported_modes array. It is set using one of the following macros defined in the driver: #define IMX258_VTS_30FPS 0x0c98 #define IMX258_VTS_30FPS_2K 0x0638 #define IMX258_VTS_30FPS_VGA 0x034c There's a clear mismatch in the value for the full resolution mode i.e. IMX258_VTS_30FPS. Fix it by rectifying the macro with the value set for the frame_length_lines register as stated above. Signed-off-by: Laurent Pinchart Signed-off-by: Umang Jain Reviewed-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/imx258.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c index ccb55fd1d506..c0a691a73ec9 100644 --- a/drivers/media/i2c/imx258.c +++ b/drivers/media/i2c/imx258.c @@ -22,7 +22,7 @@ #define IMX258_CHIP_ID 0x0258 /* V_TIMING internal */ -#define IMX258_VTS_30FPS 0x0c98 +#define IMX258_VTS_30FPS 0x0c50 #define IMX258_VTS_30FPS_2K 0x0638 #define IMX258_VTS_30FPS_VGA 0x034c #define IMX258_VTS_MAX 0xffff -- 2.30.2