Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1951753pxb; Thu, 16 Sep 2021 21:20:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhL40C4Rf3T068QmQM15YwsoXyIMvfHDoclmN3dXgOH2Vqv1FqxaG31MGW8Jyo5tw95C13 X-Received: by 2002:a92:cd0a:: with SMTP id z10mr6110516iln.207.1631852452070; Thu, 16 Sep 2021 21:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631852452; cv=none; d=google.com; s=arc-20160816; b=f7jaLGhlIsSZAexhzwueFyH6CAIsC/WXJeXnI5fcpTD3d/O4DldCLVawHWXbFPRz6L /ldSzX+Vsj/fgRmKoxLF7GrAvzuEMYybyaqA6hspBVeQ6f5dcjtKbWk4xkv0Au6ZnfFH BrSZ95wUwbT6seYiLF88EWZYMsbLxeGgyQ9bBxMPwlxO4XqStUC/+0Z3pj762OpXVpCq DyKvSX4kbLsn2l7pRMP3SncL/t7exz4SFx+LxMK5hDPp2rSsdnGrT2d4dkewyvqu0Ihv RcLfAqDeanY50wFLELC3dmrfkgMEiYfUWXfa6+k0cBXI8Wd6pQXYfOxq20nFB2GBWrQn XEnQ== 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=agVe1yqCzL6biAkL6b9EL/f/wlX/REYwF0PKeHt9K0o=; b=Ivq7Gyc2SMTLfwm/SdOJcTuE09IEY5hMgW6rLe+cPNgeJoSAJAS+A7wGlZGyNv9W/g uDoL+wX4yVVBIPJ9KNpv3zcDWGJVx3o2pEHSbFqvt0OAiGQpd19gvwGzCrpR0ioWlISl SO7y4RoLj67WnFsfzwa0+hgOkD2NVwYvFmJBq4Lo/9i6f3Zi/g5rdzGEhndSBs+7Moj6 6zUN3XoI6yl19MD1qctgg3Rmh3OhP49Qse6zVXm4n0N7juZ1DfBqTK3EghB7aAW6KZpO AA3i3cjXFtgwPaJO0wlYtNE0M5JVOJGyga9V0jG8+8xKeXnMttMQQDeiAeSdNLXWLsLn ulBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U+gECLyu; 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 l3si4197918jas.73.2021.09.16.21.20.40; Thu, 16 Sep 2021 21:20:52 -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=U+gECLyu; 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 S243784AbhIPRhg (ORCPT + 99 others); Thu, 16 Sep 2021 13:37:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:47062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352807AbhIPR2k (ORCPT ); Thu, 16 Sep 2021 13:28:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 735B4613C8; Thu, 16 Sep 2021 16:45:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810755; bh=TnE9Wlka/HbaP3UhSIR4v05u7JFUS6ZvZ5/7L0O4TAM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U+gECLyuT+Z8JlPEjM/IDmNzoJonDBSDvmB0uXV6Cr6N5wtP6r+pHsUDWf6F5vSrE kBbTVVhJx++u/CsLVRufolqoyAy9zb2x/2qW4fwau2r/mfB+IRRAKh4YhQ+UZtlHPX USmXcvnIC38jSdjKYE6QCEQCAjjc0qSE3UlqkplU= 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.14 255/432] media: imx258: Rectify mismatch of VTS value Date: Thu, 16 Sep 2021 18:00:04 +0200 Message-Id: <20210916155819.468844818@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@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 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