Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp449940pxb; Thu, 9 Sep 2021 04:52:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsQ67SMuH0ChsO/jfwkAFqJ2w81z4swh0yM66Q9ZnCPOryTHWrePxzMVJ7nMe4KRAcHbaw X-Received: by 2002:a17:907:1c8d:: with SMTP id nb13mr3047175ejc.155.1631188360830; Thu, 09 Sep 2021 04:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631188360; cv=none; d=google.com; s=arc-20160816; b=s4247kXMyDqGhahYd8Tnp7bHhCe3tyLmObWOW6tB7JlILXl6It5wy4yWOxRNE0qpbi e9yof2lhU3lqGZM6VkjQZ/eKErMqS83dGkmT9xOFctgbB3qr3VFQpsw8+HdtvvnpEVBT i6iqJFx8OV6NO6g0nPNvJj2ZLhWORiD8SJmJ/9SjrSdb9P6DX6IJX2OhTwFnv/cghFGy Ko7iw8JloOKs5OiXtHDXds1UHDGcr1+Z9p2ZTc70pz1JCXnKZZaEqDcFCNLsK5E9CN9E srKb47d/ufgIlDpgarCaRRKVJQjQzwB0cRvl20vLxfnRTD6+8kDYrL6y9yfuZnSnX6I8 SePA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=agVe1yqCzL6biAkL6b9EL/f/wlX/REYwF0PKeHt9K0o=; b=S5qtdYo/XJ6gOMZ30rfBlz/OkxMmiOtN2tRiMDstYAKWHT4dgFx1aDD0eG3Jhtq/7Q GoMxPxL2oLwdBLcj0H+b9vO08RcKgKZ6Iv3jo9KDJnc/HkUcDBlavjjb/SyyP7S6JMC0 yXFH2xSElKkQ6I3dzJ2MktKTocCveYAX6J5kcygV8NH2kLmnF38bbJQKz1FLjzIlH4W4 qC6NODSCWYJ5DBaCJxBPnsdK3FhO6JnNOH+prsmNdeIgUJP7LSUn+UHBCuS82FhpImei Qs73V7vZfxu2MEtut4Itbq7GSfX+yadfSe500j4tz+rELqe1DomvaZhwu833+p5ZRybX DymA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UzwACnIX; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si2031817ejv.584.2021.09.09.04.52.01; Thu, 09 Sep 2021 04:52:40 -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=@kernel.org header.s=k20201202 header.b=UzwACnIX; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241676AbhIILvM (ORCPT + 99 others); Thu, 9 Sep 2021 07:51:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:54526 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240707AbhIILsW (ORCPT ); Thu, 9 Sep 2021 07:48:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 96FBF61262; Thu, 9 Sep 2021 11:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187801; bh=TnE9Wlka/HbaP3UhSIR4v05u7JFUS6ZvZ5/7L0O4TAM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UzwACnIXM6a8bOEvZ8WHMVKmD5a8KTIQbMyeOYLM3h6RueEhw6LSD8NyAS7KQzGrS tkUWZ2rZW3Pyhj/l/Rvx/19Rhg2GMae55T3XK2jphrb1o4sSdmS+TjO1JRe3l7O+Qc A8H9y3X9VZSu8yWP9BDcbEp0aNTJc5U9mkUR9uIh3GGiMmqUTzblqCriGRpqM89vyT IkmDq0o+afdCKnlCc6BrCMvCpYD98/yIskm5g9uoBCgrRia+zugtm4aL7c8Fh4IKyV 6+YdnXyU1T/tNln710jCn0uG+T9u37q/p2X8O3FrUUGaV37vhpc/CnZWe8Cw4//sxH qMOnnOWjwsToQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Laurent Pinchart , Umang Jain , Bingbu Cao , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 5.14 105/252] media: imx258: Rectify mismatch of VTS value Date: Thu, 9 Sep 2021 07:38:39 -0400 Message-Id: <20210909114106.141462-105-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 7ab9e5f9f267..4e695096e5d0 100644 --- a/drivers/media/i2c/imx258.c +++ b/drivers/media/i2c/imx258.c @@ -23,7 +23,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