Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3633045rwb; Tue, 16 Aug 2022 06:29:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR5FaM29WGE1an5Arr0bgBAXoNG7VJUuLkbftV6lcjx8QSm706+OlFI4LIxoR+C62rRzpibx X-Received: by 2002:a17:906:93e8:b0:730:9e5c:b45a with SMTP id yl8-20020a17090693e800b007309e5cb45amr12834904ejb.530.1660656576180; Tue, 16 Aug 2022 06:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660656576; cv=none; d=google.com; s=arc-20160816; b=zbjnqRBLdLwh52KZup1+q3X73qMkia3NLom0QOdoe+HJi0UQ9MA6hGU+GMocI7c7/i Vy6vRv/ip8AFG/fns+dpVRVlVF/HudUHV9YAvRRBffpZC42+HnfHxWUVMEkUQDeTA9lB bdkBX68Uf9UvirsLUSI+ml5r0pb3dcoxAy2Bb7z+hwFPs4yjO/nVjBXqxm5An1q2Hsw8 Kc5vabBw6XmN4lnTNroTIl/S5eQAoEd2ixqWzvbh8z25MxVGdYJ3mLZFhJqYr8mn4P7T JDK/5DKk7Xv95gJIuyV4UGT+8ZzWzvx5naUehMfXTWugArYxoymfl+2ProkC97WQDWoj cVTQ== 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=U+FP9WL6qHxAhIYTKKc2LvJDq7iEJgXc9SQbodiDDXA=; b=RSD0x5rZ5WT+qkLmr8bwWP1ttiKp/vand8UnHxlv9d3bIxvEn2uiWxikSXYKF1mRnA HCB2FUR89FZvMWIg2gQIvvBA7WM5DuNhXYyPnEf9YBovaeI0fvkCnmop7gDA3jvLRQTy rMq8mIrjJ9OCVJ0s9St5UKqv+7cKTHTKXUBUKwXdDaEV94uJOT3uttzh5q1bITiXMQx1 3wMDLiebgH+aiOWiUrHxwLuK3pU6cBzNUVQHUgHTVbcniQaD+PcY+QWdV2KKWA6V6xZi 0VY5lTCiqhmNtePXt48uzRwmEeEiIjCIfNsy8uHodk0zBSPwf+WNN4gN0Lhdw7ZlORUA eshA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=kJHgvO1K; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Tc31jgiK; 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 sh31-20020a1709076e9f00b0072f40d666d6si10706691ejc.602.2022.08.16.06.29.10; Tue, 16 Aug 2022 06:29:36 -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=fm3 header.b=kJHgvO1K; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Tc31jgiK; 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 S235654AbiHPNU6 (ORCPT + 99 others); Tue, 16 Aug 2022 09:20:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235629AbiHPNUt (ORCPT ); Tue, 16 Aug 2022 09:20:49 -0400 Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11C9478BEF for ; Tue, 16 Aug 2022 06:20:45 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 402C058037D; Tue, 16 Aug 2022 09:20:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 16 Aug 2022 09:20:45 -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=1660656045; x=1660663245; bh=U+FP9WL6qH xAhIYTKKc2LvJDq7iEJgXc9SQbodiDDXA=; b=kJHgvO1K5X0yS0bXTChkquj0OR RCqHnNc0XBPUm3z7/WQdy5I5PLYVzPHjIdS5OZOIuEfLDyIsD/C1uGYVV4cetvIs NsNprQ8/ltFMmNqACY4L2Jamw1Py44t1jUjVCUbu3ecCRSBcBlyesR77IMVtD3GL SxHtV5HQm3W3GBPzXNqyOEqrCgE2IHdxTFkTqsg7u0lV6SIF76nj4n6KjfHuXVrH x6d5n9FNGnDfaHYc1nVkvD/70S6O6AFqXgmPtrrNJDbBJd29vEGJgEHb0Fse3hFc yxmEYL9ytZDahmeoSvWgVNvlo9jeUIVbP+yYD9iXbfqj8Aca5A8/jhCzZdPQ== 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=1660656045; x=1660663245; bh=U+FP9WL6qHxAhIYTKKc2LvJDq7iE JgXc9SQbodiDDXA=; b=Tc31jgiKV5ovT3ovNozG+Pnm++oNgJ4zTUPLNWDit1I9 Hvxm1aapLTpKhJILH2PqTF0YmOH4MSHwgLDInaTkSjvtt3JFSNw/86LLTGvvRW51 3I8JQa9ZdbNlV5G10yeloK2aMT/VfzQuZ7kqiUJAPrVvfpvVCSs3ZaELCQzkIdGC RCJh9y7jbBzlWjE9TD/r/NtpgnNJDGZiidnMkodJVlf41Iw35XEBS+C4H8z1sL6f hjSWjlTnKjEV6X8NnPtcusvXvvMbcLZGOZXeCV4ILTH+fnQdUlqrx2eICkmp4464 JVNvn6zDFQMJ1tU5vS+lnIV6tJFYHdUIFzr2g+CO7w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehgedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeetfefffefgkedtfefgledugfdtjeefjedvtddtkeetieffjedvgfehheff hfevudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 16 Aug 2022 09:20:42 -0400 (EDT) Date: Tue, 16 Aug 2022 15:20:40 +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 05/35] drm/connector: Add TV standard property Message-ID: <20220816132040.uwirtjm5yr6rdd3q@houat> References: <20220728-rpi-analog-tv-properties-v1-0-3d53ae722097@cerno.tech> <20220728-rpi-analog-tv-properties-v1-5-3d53ae722097@cerno.tech> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6ena3yqc72sajvcu" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 --6ena3yqc72sajvcu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Geert, On Fri, Aug 12, 2022 at 03:25:18PM +0200, Geert Uytterhoeven wrote: > > --- a/drivers/gpu/drm/drm_connector.c > > +++ b/drivers/gpu/drm/drm_connector.c > > @@ -1649,11 +1650,40 @@ EXPORT_SYMBOL(drm_mode_create_tv_margin_propert= ies); > > * 0 on success or a negative error code on failure. > > */ > > int drm_mode_create_tv_properties(struct drm_device *dev, > > + unsigned int supported_tv_norms, > > unsigned int num_modes, > > const char * const modes[]) > > { > > + static const struct drm_prop_enum_list tv_norm_values[] =3D { > > + { __builtin_ffs(DRM_MODE_TV_NORM_NTSC_443) - 1, "NTSC-4= 43" }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_NTSC_J) - 1, "NTSC-J" = }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_NTSC_M) - 1, "NTSC-M" = }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_60) - 1, "PAL-60" = }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_B) - 1, "PAL-B" }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_D) - 1, "PAL-D" }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_G) - 1, "PAL-G" }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_H) - 1, "PAL-H" }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_I) - 1, "PAL-I" }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_M) - 1, "PAL-M" }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_N) - 1, "PAL-N" }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_NC) - 1, "PAL-Nc" = }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_60) - 1, "SECAM-= 60" }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_B) - 1, "SECAM-B= " }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_D) - 1, "SECAM-D= " }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_G) - 1, "SECAM-G= " }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_K) - 1, "SECAM-K= " }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_K1) - 1, "SECAM-= K1" }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_L) - 1, "SECAM-L= " }, >=20 > The above are analog standards, with a variable horizontal resolution. >=20 > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD480I) - 1, "hd480i" = }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD480P) - 1, "hd480p" = }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD576I) - 1, "hd576i" = }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD576P) - 1, "hd576p" = }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD720P) - 1, "hd720p" = }, > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD1080I) - 1, "hd1080i= " }, >=20 > The above are digital standards, with a fixed resolution. Are they? It's not clear to me from looking at nouveau, but I was under the impression that they were modes for a component output, so CEA 770.3. I don't have the spec though, so I can't check. > You seem to have missed "hd1080p"? Nobody is using it. If we ever have a driver that uses it I think we can add it. > In addition, "hd720p", "hd080i", and "hd1080p" are available in both 50 > and 60 (actually 59.94) Hz, while "hd1080p" can also use 24 or 25 Hz. It looks like nouveau only exposes modes for 480p at 59.94Hz, 576p at 50Hz, 720p at 60Hz, 1080i at 30Hz. > Either you have to add them here (e.g. "hd720p50" and "hd720p60"), or > handle them through "@". The latter would impact "[PATCH v1 > 09/35] drm/modes: Move named modes parsing to a separate function", as > currently a named mode and a refresh rate can't be specified both. I think the former would make more sense. It simplifies a bit the parser, and we're going to use a named mode anyway. > As "[PATCH v1 34/35] drm/modes: Introduce the tv_mode property as a > command-line option" uses a separate "tv_mode" option, and not the main > mode name, I think you want to add them here. It's a separate story I think, we could have a named mode hd720p50, which would be equivalent to 1280x720,tv_mode=3Dhd720p Maxime --6ena3yqc72sajvcu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYvuZqAAKCRDj7w1vZxhR xRpdAQCdHo+W59CWD9zJ3T1LvoCmG3uMcVuRQ9G79/cpqOxH9wEAhPrjIiW5PuV0 9yKEPpR9rUmMFVvJOYSKOJ0j4md2bQE= =XiNC -----END PGP SIGNATURE----- --6ena3yqc72sajvcu--