Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2565988lkm; Mon, 20 Sep 2021 18:52:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWHpCe/uOKj/uuebghio0QVBmP7gbAw5HbC/MwVEsIirh8O+Ff7hz70pqnP0uyZXl+sR2+ X-Received: by 2002:a05:6602:2c0f:: with SMTP id w15mr21726548iov.106.1632189153955; Mon, 20 Sep 2021 18:52:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632189153; cv=none; d=google.com; s=arc-20160816; b=DEU6kPYGkHk9QwFZZy6Z5spXTmgql83ozeJHpzQDvmL83rlb5F/LdBx1BdJClJt4/+ z59qgvdwjv2/7K/ELZwZ+bHtKCX5w4QNfKGO0BVr1pmaZqLofN50WF2XrbWMo3lsY7Rh 5nHGHB0JtVY7fSxeKdMSHvNepvWAyDe7O+RRJme3sEMHywXQ3W3pYYGfzjl3ouaki6wU CBy20lGD0vu6Rm7VI3rOlRAw8euE4sNJU/dTa2sEz/lcdpUm3u3+OLXIh/agujugEsH0 30hh5Wq9mg7htQuiKmHsGCkrPP4azcpL290c7mHHg/1VfV24gSgxzmquy9aRNfkS7bi/ n2pg== 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=BM7bf7npDUJOHjIfQxvd0i0DdHLh5WmZFbIHXWj34hA=; b=dnSeP1ewRdjSxPFkAZIPBsqer9F5H7xlySM1UjIJczfvWx/pu4CRBAM4cVJCrsstgj GoGLclv+Exb8C1S+qlzqN/+06fnQY+16e8L42/eXrn2v1D5vApcgsvsFjsP1KK6IE/UY KyGPSW/I4jRN43cxsjWnR2J1LWSzyIsDzEs2fvcJJWCx7TRSddjXQEo7AZka76jAFPr8 0dx4Yb91h0HEvPFHQtvyFxSDZjVkQlJmgWQ8TF7x5JC/vTrPaRi24Uunuco7eHG4buNX oAmIqczNNPN6WjtMR+vPLsXROVTTQi/pbbqVeP7tIndWgYJBF6BU4ck8x6ikeYLFtXbU RSzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=o0ZTMBaS; 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 a10si9967281ili.135.2021.09.20.18.52.22; Mon, 20 Sep 2021 18:52:33 -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=o0ZTMBaS; 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 S1376745AbhITSO1 (ORCPT + 99 others); Mon, 20 Sep 2021 14:14:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:35780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359320AbhITSJ2 (ORCPT ); Mon, 20 Sep 2021 14:09:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A0AAC613D1; Mon, 20 Sep 2021 17:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158369; bh=uAbR59EJyY356MSmfgpeGTVaI69N2/xc0UlG7WwyYPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o0ZTMBaSoI6T3MRcib1YCDAm+F7lcyyHTr4aSAi8/nUwTTo0u9z9/dub0OOsDNNU2 6A1CqB9Eq2YcEJYjLHMobWQf7ucC044nCN4QlEXceTMUU0Ta/zXzLWa35KbUwG3/Je QyPyiQff9fsBUlJ0qB54fiD7I58kHfQ8EUMbFppQ= 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.4 117/260] media: imx258: Rectify mismatch of VTS value Date: Mon, 20 Sep 2021 18:42:15 +0200 Message-Id: <20210920163935.110418501@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@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 f86ae18bc104..5f5e50c01b12 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