From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3B1DC00140 for ; Thu, 18 Aug 2022 13:00:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=x25vcGWCcCzMZZdwDXOYN+G6GzwSqyhO+Fvb/4fOyhM=; b=HBTVI3EwZJSM/0NXD3D5rbjOv5 norkuml9OHpRZieyGkXz+BJhr1nzwxGsS/uaZDAXDQ7DfAyQTkPm8K3LMmFQqxs9ZWYOmDb6r/EYm +bF+VmW2OW0HDFx3ZTy4rgbAcjqgTnqCk8Od6790/xT6i300SFsb0cg53gK74m39XkRowa3D3AIdE fSEVTDAZB0A+0c4VVx2JLmNzG0lWvv8GVDbwORpsI0IEXkuE6UaMV1Z9j4Q8fxK1nWfrMkPFwhPPF 4XxaKXwDTpS/rdHul9aGvbwPc9he6DEabvnGxpW+kp1QNZc43VRoPoNq9Wsx5yqKKkcz+Sijz1AT7 vKdBui2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOf6y-004wyS-JT; Thu, 18 Aug 2022 12:59:00 +0000 Received: from wnew3-smtp.messagingengine.com ([64.147.123.17]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOeoR-004iMh-HH; Thu, 18 Aug 2022 12:39:53 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id D00832B05E6A; Thu, 18 Aug 2022 08:39:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 18 Aug 2022 08:39:42 -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=fm3; t=1660826379; x=1660833579; bh=YRrkqYfUey d/afvSZhJ0kvziJy3S8LJDEtRjqUfFPSo=; b=IHz9beHjK6BmV92EOKI1gLLc0M P9t82G2uluVqd7svl2yZLWMAJoeAjLoGLogb98PqFknQRGD1gtJZ6LtiUoi1SBky IDyfMCqUl7rOPRZ/q0daavXQU/hdPPdM+38Le4gYw/FJg+DjGAZSmIuyBS57YrsB e63wCjCvBy8K+nrRoPsw5EnywFBAD8u5plPWclrho6XuiOChzZc609mjM6oqKhQI SWQZT4a8qwcJonb/0eZ6aTEXpRmdN6oTtLBmev2evIFDRvsr9fyiTsd0X1xdVoP2 Aq4HbOt2ei1w/d6+L2su/JzudsXQNLB7KETrs2DkncF2s/uqNzDSXvAnYg3g== 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= fm1; t=1660826379; x=1660833579; bh=YRrkqYfUeyd/afvSZhJ0kvziJy3S 8LJDEtRjqUfFPSo=; b=qAvK/y25kdOixORQ1DcGPmxPcHWSUKsl3RV+tTDS1EO5 NOPj/sCCY7oGDwQwvyJWkJzhPy2M/OOY5ydNH2EDdTJe/u8NLQGUEffJ3ICIDg9z 8Yk7ItX8XgPmjfb5zXPdgWKTuWIoSrYxKdCndlpJivExLPhVOq0KSKs/XGioJy+I HqjVn5aKmUL328f1qyZjr9lU+Ponwbefox24cnMfTYvkq8Cy0/utT+EUWgx7YCW2 N5UHkZgC8btjVzhbarvvdtUT9roMh2sottdMTFausmjJdvPjoNC7NNqXf/JSso6c RDM6b/ga/jMLUuMKsEP3dxx6+PrxnKHvw62M20jSBg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehledgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpedvfeevudfgvefhtdefjedtfeelheeigfeghfeijedvgfegffevkefggfff ueejtdenucffohhmrghinhephhhinhhnvghrrdhinhhfohenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgv tghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 18 Aug 2022 08:39:37 -0400 (EDT) Date: Thu, 18 Aug 2022 14:39:34 +0200 From: Maxime Ripard To: Geert Uytterhoeven Cc: Jernej Skrabec , Martin Blumenstingl , Chen-Yu Tsai , Philipp Zabel , Jerome Brunet , Samuel Holland , Thomas Zimmermann , Daniel Vetter , Emma Anholt , David Airlie , Maarten Lankhorst , Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Kevin Hilman , Neil Armstrong , linux-sunxi@lists.linux.dev, Linux Kernel Mailing List , Phil Elwell , Mateusz Kwiatkowski , Linux ARM , Dave Stevenson , "open list:ARM/Amlogic Meson..." , DRI Development , Dom Cobley Subject: Re: [PATCH v1 04/35] drm/modes: Introduce 480i and 576i modes Message-ID: <20220818123934.eim2bfrgbxsmviqx@houat> References: <20220728-rpi-analog-tv-properties-v1-0-3d53ae722097@cerno.tech> <20220728-rpi-analog-tv-properties-v1-4-3d53ae722097@cerno.tech> <20220816132636.3tmwqmrox64pu3lt@houat> <20220817075351.4xpsqdngjgtiqvob@houat> <20220817131454.qcuywcuc4ts4hswm@houat> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220818_053952_183658_366532F8 X-CRM114-Status: GOOD ( 32.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0886274598531495691==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0886274598531495691== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lcxbafgaqwff7pps" Content-Disposition: inline --lcxbafgaqwff7pps Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! On Wed, Aug 17, 2022 at 04:01:48PM +0200, Geert Uytterhoeven wrote: > > > > > Vertically, it's simpler, as the number of lines is discrete. > > > > > You do have to take into account interlace and doublescan, and > > > > > progressive modes with 262/312 lines. > > > > > > > > So we only have to deal with 525 and 625 lines total (without taking > > > > interlace and doublescan into account), right? > > > > > > Yes. > > > > > > > I guess we still have the same question, we probably want to center= it, > > > > so top =3D=3D bottom, but what about the vsync length? > > > > > > Unfortunately that table does not mention top and bottom margins. > > > But according to drivers/video/fbdev/amifb.c (see the "Broadcast > > > video timings" comment block and the definitions of the "ntsc-lace" > > > and "pal-lace" video modes), they are asymmetrical, too. > > > > > > Vsync length is 0.576ms, so that's 9 scan lines (I guess I didn't > > > have that info when I wrote amifb, as I used 4 lines there). > > > > Thanks, that's some great info already. > > > > It's mentioned though that the settings for NTSC are "straightforward", > > but it's definitely not for me :) >=20 > As in NTSC just uses different pixel clock and horizontal/vertical sync > rate values... Oh, so the constants differ but the calculation is the same, ack. > > I've looked around and it looks like the entire blanking area is > > supposed to be 40 pixels in interlaced, but I couldn't find anywhere how >=20 > 625 lines - 575[*] visible lines =3D 50 lines. >=20 > [*] BT.656 uses 576 visible lines as that's a multiple of 2, for splitting > a frame in two fields of equal size. >=20 > "visible" is relative, as it includes the overscan region. > Some PAL monitors used with computers had knobs to control width/height > and position of the screen, so you could make use of most or all of > the overscan region It brings back some memories :) > but on a real TV you're limited to ca. 640x512 (on PAL) which is what > an Amiga used by default (with a 14 MHz pixclock). > > it's supposed to be split between the upper and lower margins and the > > sync period. >=20 > "Field Synchronization of PAL System" on > http://martin.hinner.info/vga/pal.html shows the split. Thanks, that's excellent as well. I'm mostly done with a function that creates a PAL mode, but I still have one question. If I understand well, the blanking period is made up (interlace) of 16 pulses for the first field, 14 for the second, each pulse taking half a line. That amount to 30 pulses, so 15 lines. I first assumed that the pre-equalizing pulses would be the back porch, the long sync pulses the vsync, and the post-equalizing pulses the front porch. But... we're still missing 35 lines to amount to 625 lines, that seems to be counted in the field itself (305 lines =3D=3D (575 + 35) / 2) So I guess my assumption was wrong to begin with. You seem to have used a fixed vsync in amifb to 4 lines, and I don't understand how you come up with the upper and lower margins (or rather, how they are linked to what's described in that page) Maxime --lcxbafgaqwff7pps Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYv4zBgAKCRDj7w1vZxhR xYV3AQDMVX9EP9IeMgn/VC77iWNl8fZWLl3pV3GsUW4BHyIW6QEAnOHXzzmKBAoR Ta1eHGvbrbL9eJf0qR3cPhqIhbYH2Q0= =lHS5 -----END PGP SIGNATURE----- --lcxbafgaqwff7pps-- --===============0886274598531495691== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============0886274598531495691==--