Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2568522lkm; Mon, 20 Sep 2021 18:57:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdaD56pMOtyZPLoxzE9oyfeA86eV8ULe17U0mm8hLLea5PXFqg6/hG3fgHvOi0+NXF+zcW X-Received: by 2002:a5e:8e4c:: with SMTP id r12mr21495243ioo.73.1632188983931; Mon, 20 Sep 2021 18:49:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188983; cv=none; d=google.com; s=arc-20160816; b=iDG4zNn6u116ps64aIz+gIAV0Wm3kjTit6mgQw7ADzsmRZ5ww2TQAUKcqXxkGOFFhr PS714dvJGC+d1JMIsXBO0ikh9pDhe6UlFTQl3fTRzh8mDTCu1O0voxZddrFetXgBsrnz b/qWvZuD005x5mu1UbPfd6O5CHQlKMIadOiNmQBLkitvy+P+B3vSPUovyxWOf5+EYJjl gyLb3yDlzmJLqptMmRT10+uVo9TZrgFnYLzFA2hEiTqvuFJuuRNSW0YbsQEpaoqQaRqK J3YsOQFGyIsoNZ9K79wT6zKBPPEQ7aSlBPrTIiqlyA1mal7Ph3hUtqp6B8lF6Q356a1k BNow== 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=D7PW96VsxIeVLdDruvIpjo6nrXlhNXjDJTajChvsg+E=; b=Comg8PXu3jmn6o9HVAdHu/lsJq1ggm4yKzJToHudIPlm+4oXB7p21obDufPPeUv6+O /hw+JhDn8yK6MlEiF39aWKs1R6eqRscJ0WbEj5ByUffnEXEhzGvHxYU4QY1bkOvvKZD0 USIqvLYVNEHUUx6jg/iGPZHr1ZQ27RbtbCi1Khz1hzkMmQKC0qylMyPLt/tWGWWpwGi/ TgLzs7CT0EHs4IOwhcTr8JiUgIFnhQRFBBv6BYI+lEu26ymLcWqFvJxBa9FMHGiBBGM+ 4TX65ctou88RQMYXUbZrcGP28bQm++6UCVmenEUVOMteVNiRXStzPuOmeOKXwXQEFO58 l/Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HXsD8KTS; 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 p8si15153177ilo.5.2021.09.20.18.49.33; Mon, 20 Sep 2021 18:49:43 -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=HXsD8KTS; 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 S1347267AbhITRzu (ORCPT + 99 others); Mon, 20 Sep 2021 13:55:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:52106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354422AbhITRtx (ORCPT ); Mon, 20 Sep 2021 13:49:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 580CC61BD2; Mon, 20 Sep 2021 17:11:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632157909; bh=1a5y8LiFONH2ffe+Lg7p+xIrgh8MKkOsFNyV/nOJ6tg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HXsD8KTS2rNJf8e3/Bt2MPUg0KQmgI/GWXYjKsAbI1CZdBaPS/99uXkNMYwXvI3c0 /K/RxiUpDw84fDtCHgPPlIxN5ToWOKn6opliCRY50L0tPyY+9fErJfwMNJux1USF75 96GCL8BhTKY2ZKJDLcXCD3Tbhy0+ma+I0W2P2iBU= 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 4.19 206/293] media: imx258: Rectify mismatch of VTS value Date: Mon, 20 Sep 2021 18:42:48 +0200 Message-Id: <20210920163940.315279181@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163933.258815435@linuxfoundation.org> References: <20210920163933.258815435@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 31a1e2294843..68ce63333744 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