Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5806620rwb; Wed, 7 Sep 2022 08:15:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR6WZhlS7Pxti3SDm6nyxuHtmcyBsGZoCn/jbRvOBUqBGIV98gV02w6fV1HrCuhWyCByuVYQ X-Received: by 2002:a65:6cc8:0:b0:3fe:2b89:cc00 with SMTP id g8-20020a656cc8000000b003fe2b89cc00mr3880733pgw.599.1662563715005; Wed, 07 Sep 2022 08:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662563714; cv=none; d=google.com; s=arc-20160816; b=Mflaz0tZ3xBzwz2I7koo81BTN68iKl6rZyqU1Oj/s9TFKeeZdX9UF7HDDexCthvjvH HmwxEGQZwSVcUuIdAMZB6goiTZn+YFotnUg/fwq8+v6Hb0OHbD/alf9B9rclQLlDvlyv 4NV0M4x7nOMbZZYSz3Q1rKZAaYhXP9gteVR/NXHwfQdve4wZsSjPnB7JvxJa8xIRsln4 gA2wtfzknl5wra58uW1565MdvD8tFK0Q/ILWetr/aaWdaTqDk3zLlzH2drVevCS1QNVR NctX9tbOgU/iCg2M6+DfljfjFcH6GSL06HtGctU5SEmQCBPU/7xsG111nLYL+Rxql7Rl SCzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=JgmI+KGSUN45Wie/3+bjGkbyz5oOCqNiJe6kdug5myc=; b=nG36RrSjfpPE+PiF4/K4XECmLhx7isdpLhatZQe5YllkR/4QuigI5+UXiFeNyezgzl p7OaUx9TZCJrMxldb+JaFpDmkK9I19WT8OfwL7W19kEYY8kTNQHiD00F7KuVRRZwioXC 67DCHqkBIhutGsWxL9cdA/NaGy3+OLRCXl4uy6EQpy47ZXQ8xUzCpBqHwecEXQewjBW5 NwV16b7eDPl6j6qfoOiFKLlad5o7j1wJHPzNN8bF+HgIjVNM6hduWHuUxk6aqnJ6FBKR tdKzGFWpvIknghouMx3cY0scQWnBQU2FHtT24IXh5bO0ESQrrDgj2UugVZAoFBg1PNzb 6+VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=fEOSeRjg; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=QZsve74E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u68-20020a637947000000b0042a363886b4si4088318pgc.789.2022.09.07.08.14.59; Wed, 07 Sep 2022 08:15:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=fEOSeRjg; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=QZsve74E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229782AbiIGOeq (ORCPT + 99 others); Wed, 7 Sep 2022 10:34:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbiIGOei (ORCPT ); Wed, 7 Sep 2022 10:34:38 -0400 Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8753DF10 for ; Wed, 7 Sep 2022 07:34:29 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 1F2A25804F0; Wed, 7 Sep 2022 10:34:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 07 Sep 2022 10:34:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1662561267; x=1662568467; bh=JgmI+KGSUN 45Wie/3+bjGkbyz5oOCqNiJe6kdug5myc=; b=fEOSeRjgEOD6B/j91iz7LAm2nV zm9is7Er/ViHIxBpgpZb6lwibFClewD+iIDcvBDRp+1lmhPCyaLqGg7IA7cP8Xoc wuPl4RWLG7DFN/l8Ef3DsxfT1cd2zQLRfIYCirzpNWoWvJn1u1DHeJKGdSUDI28z 1jY0sVontbTSiey/BmEiACSSDUwkweDEP8Y88zWm/rexWHXi4G8cMuE0k+2Ubav8 yVcnkHbvjTtEanw7DdeSQbMbBEQZUlGAaHFddXqW8+k9yjnOhCF7l9h878Ua8DYW sgayo4HxqN7j7DCzmcPR4NNETP7WQrV7L9DlqdV2OvKcqO+2mZ+6pYjLKaNA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1662561267; x=1662568467; bh=JgmI+KGSUN45Wie/3+bjGkbyz5oO CqNiJe6kdug5myc=; b=QZsve74EP24R9KWs9WZsCIVkxBNujxPG60TN9puqze3c o6aNhrxKdPVbGh09EQgmTIu30mCjSkY9oBqwNWg3cRbVT9CSGDTSlxglGLwGruZV vARWixq4SBADNaeBNbJTGCIG9odD6/9WAWxTk4aOKFPICop9IO3pcwWu9wND5de0 WZ78qWyg0sbruHsLAn0/vTLXw7MuMI08liDizfiz6oJ2b/8T5ZAp2EpYm9J/sOJe 0O49dbliLK8gjn2pXV+ferzud7lC4N6BLE7ZvbYFTFT4O8aQGL1u1rHr3lvb7iPF JbqQ9W8hlaP3qBDs1foUJk1yTi+UzY3FpobNfifkdg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedttddgjeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtudenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeejveefheefkeeiffegveelveetgffffeektdefuefhtedtgeejhefggedu ffffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 7 Sep 2022 10:34:24 -0400 (EDT) Date: Wed, 7 Sep 2022 16:34:21 +0200 From: Maxime Ripard To: Mateusz Kwiatkowski Cc: Ben Skeggs , David Airlie , Chen-Yu Tsai , Thomas Zimmermann , Jani Nikula , Lyude Paul , Philipp Zabel , Maarten Lankhorst , Rodrigo Vivi , Tvrtko Ursulin , Jernej Skrabec , Samuel Holland , Karol Herbst , Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Emma Anholt , Daniel Vetter , Joonas Lahtinen , Hans de Goede , linux-arm-kernel@lists.infradead.org, Phil Elwell , intel-gfx@lists.freedesktop.org, Dave Stevenson , dri-devel@lists.freedesktop.org, Dom Cobley , linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, linux-sunxi@lists.linux.dev, Geert Uytterhoeven Subject: Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes Message-ID: <20220907143421.4iopqwhp3yfircsh@houat> References: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> <20220728-rpi-analog-tv-properties-v2-10-459522d653a7@cerno.tech> <242d272b-5b79-986c-9aaf-64e62f6b37ff@gmail.com> <20220905133755.gcmmntg3wnecyqjq@houat> <10ce686a-d7c8-9ce4-3979-735ad8eab3b5@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xs3njf2uogpsrjq3" Content-Disposition: inline In-Reply-To: <10ce686a-d7c8-9ce4-3979-735ad8eab3b5@gmail.com> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE, T_SPF_TEMPERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --xs3njf2uogpsrjq3 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 05, 2022 at 06:44:42PM +0200, Mateusz Kwiatkowski wrote: > Hi Maxime, >=20 > W dniu 5.09.2022 o 15:37, Maxime Ripard pisze: > >>> +=A0=A0=A0 vfp =3D vfp_min + (porches_rem / 2); > >>> +=A0=A0=A0 vbp =3D porches - vfp; > >> > >> Relative position of the vertical sync within the VBI effectively move= s the > >> image up and down. Adding that (porches_rem / 2) moves the image up of= f center > >> by that many pixels. I'd keep the VFP always at minimum to keep the im= age > >> centered. > > > > And you would increase the back porch only then? >=20 > Well, increasing vbp only gives a centered image with the default 480i/57= 6i > resolutions. However, only ever changing vbp will cause the image to be a= lways > at the bottom of the screen when the active line count is decreased (e.g. > setting the resolution to 720x480 but for 50Hz "PAL" - like many game con= soles > did back in the day). >=20 > I believe that the perfect solution would: >=20 > - Use the canonical / standard-defined blanking line counts for the stand= ard > =A0 vertical resolutions (480/486/576) > - Increase vfp and vbp from there by the same number if a smaller number = of > =A0 active lines is specified, so that the resulting image is centered > - Likewise, decrease vfp and vbp by the same number if the active line nu= mber > =A0 is larger and there is still leeway (this should allow for seamless h= andling > =A0 of 480i vs. 486i for 60 Hz "NTSC") I'm not sure I understand how that's any different than the code you initially commented on. I would start by taking the entire blanking area, remove the sync period. We only have the two porches now, and I'm starting from the minimum, adding as many pixels in both (unless it's not an even number, in which case the backporch will have the extra pixel). Isn't it the same thing? > - If even more active lines are specified, once the limit for vfp is hit,= then > =A0 decrease vbp only - the resulting image will definitely be off-center= , but > =A0 there's no other way Unless you only want me to consider the front porch maximum? Maxime --xs3njf2uogpsrjq3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYxir7QAKCRDj7w1vZxhR xYnUAQDKFDkrZV/fLpjtD+btaCpKvPKkEUm37bnBk3TyD3SBTAD+I0kVAytjVinQ y5KTIrc3dKg0llXX1SWgrvw0OE2vMAI= =QW9g -----END PGP SIGNATURE----- --xs3njf2uogpsrjq3--