Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3178214rwb; Mon, 5 Sep 2022 07:36:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR7k52joC+7r1pEhVR8/I4xs7Zm9xLVu/Xv8b2U8QDJkRo2hkUQ9ttqt0aFciMNJ1LiDYjP4 X-Received: by 2002:a17:906:cc15:b0:73d:d87f:f039 with SMTP id ml21-20020a170906cc1500b0073dd87ff039mr33979093ejb.253.1662388566886; Mon, 05 Sep 2022 07:36:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662388566; cv=none; d=google.com; s=arc-20160816; b=z5NnAar40p1TSIXui98dkqY6Fm9EAES9r38np6NMlO4Ksy65UJYUjnEg3oLWHv/Mob 3Y2gByu1elgKdT6sr0PqFJmk5YPNhGs+eg6pivuBMwLljnSIDBJjxeWBYtEVhIGuLE4P lRqRBtYfym0fFCt8Knx95MrOwUZI1LzkiLv1I1pkdDGvgZxHd3TvhMbwR/XRG7n5ARpq ItHFX52MTyNRe7kMW+XIxVpnE+i6sMrNAsTld8RGSiCCjTEV8lGUG6evTRcdIwpyWZZ1 tW1oXYCCDoBUI/xJlOjuYfLHC6btQqUR2nf4i5U+jbOr1cH7QYejidDrqSHyjQCRKQPs oTTw== 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=vefUy4dRsZVWF0YIrw3msOYzL5sGqxLnWRwOjKgBDrQ=; b=zpUn0Kwp674Rqt5NCYtOekDnj+3aclF8W/OOk5VBliYJk/GC7U8WCiRT3Wa0io7B6Z 5+sELYali5//xwdJ3AxA7xdWQNDO9UsMS/ITBhvTMomVEk17ovfmN7DotT8NOfEYas1A GZvaB3aXUg1Wn+84lw7cI0OrpU2asARJBKFNcsHI4gqCceQhaipo/TztgrczUJgp6jpG b5ZiLWs1H3map7IwcB0IsVd89+04GVW7eH8kFe9vGDZzNufhXHhifGLrxAjGxnk2Op/z B0nlcbieHbIfv9PnciamrMQtvyU+deHhlzhR7mj62HjjLdqzzbRjmk38s0b3bqLYZwP6 /F8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=K2XS8PGl; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=YSGrRmXY; 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 r6-20020a1709064d0600b0073dcbcf820esi6303318eju.200.2022.09.05.07.35.40; Mon, 05 Sep 2022 07:36:06 -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=K2XS8PGl; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=YSGrRmXY; 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 S237809AbiIEO3F (ORCPT + 99 others); Mon, 5 Sep 2022 10:29:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238091AbiIEO25 (ORCPT ); Mon, 5 Sep 2022 10:28:57 -0400 Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 869CB5AA06 for ; Mon, 5 Sep 2022 07:28:49 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id BD5585801E7; Mon, 5 Sep 2022 10:28:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 05 Sep 2022 10:28:48 -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=1662388128; x=1662395328; bh=vefUy4dRsZ VWF0YIrw3msOYzL5sGqxLnWRwOjKgBDrQ=; b=K2XS8PGlr2rLCbhGAhNKVV1mKa oE5a/DxS0PxYT09GHAoeKfQb2EbQCJ9mu4w58MqnAKA1v9KKxxsiYAxH7YOsy1BN 33JRgsa8h4OHegIECgAC9cSpyUMc/Lo2C5mNrEChFfPna0d7iS4gIrwUted9CHx7 qbnimRJOdwi2we5OgCLd/60A+k3wyzn4j3TdiHlGFcBFcI08cKnqIx93lEL+bLCT CqAKbzWub2maQ+RaEAZeMK1h2/Od9syCt1Oc4Z5nD1+HayHeRoUYskPKsrsmSzCh e3N7WD2rFsuM/GYBLynULlDETMkMlutJu524iww9KxGAYCF5MtrBhwWigXQg== 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=1662388128; x=1662395328; bh=vefUy4dRsZVWF0YIrw3msOYzL5sG qxLnWRwOjKgBDrQ=; b=YSGrRmXY76fbUtPERuSV+9e6lsEx56hA5vrGlNt2Qpgs zOPKczGZQJsxK88Md2RogOECuW5zwHOeJnPTijXakF/dmAlb5LGVud5m+mQe5Sl7 Nx+dNIsVXROz/pUj6cCxv3K2uWryMWKWKGA87vjkcV2kZd3PrAyjrivRHG//4Cy0 8npyhIOZIK0GH7J2zQzX6NbvhdhETzfHNoxutJTlJzbT/hn62C0tzHeBHUXEmf+L nIWXmDFc1kwRBghV8udUcYftvhHn+v2vzmUQ7nlzQb7ok4/4d57hANxyRbucnqdL hJAerM1Ql35aS0OaCNwHAOYgRUdk2HE+fkLZivJ7tw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeliedgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtudenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeejveefheefkeeiffegveelveetgffffeektdefuefhtedtgeejhefggedu ffffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Sep 2022 10:28:46 -0400 (EDT) Date: Mon, 5 Sep 2022 16:28:42 +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 19/41] drm/modes: Introduce the tv_mode property as a command-line option Message-ID: <20220905142842.c3rvtupggdmavq7z@houat> References: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> <20220728-rpi-analog-tv-properties-v2-19-459522d653a7@cerno.tech> <2f607c7d-6da1-c8df-1c02-8dd344a92343@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="a666jub4kxs6fn4h" Content-Disposition: inline In-Reply-To: <2f607c7d-6da1-c8df-1c02-8dd344a92343@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 --a666jub4kxs6fn4h Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 02, 2022 at 12:46:29AM +0200, Mateusz Kwiatkowski wrote: > > @@ -2212,20 +2239,22 @@ struct drm_named_mode { > > =A0=A0=A0 =A0unsigned int xres; > > =A0=A0=A0 =A0unsigned int yres; > > =A0=A0=A0 =A0unsigned int flags; > > +=A0=A0 =A0unsigned int tv_mode; > >=A0 }; >=20 > Are _all_ named modes supposed to be about analog TV? > > If so, then probably this structure should be renamed drm_named_analog_tv= _mode > or something. I don't think they need to, but it's the only use case we've had so far. We could also imagine using UHD for 3840x2160 for example, so I wouldn't say it's limited to analog tv. > If not, then including tv_mode in all of them sounds almost dangrous. 0 i= s a > valid value for enum drm_connector_tv_mode, corresponding to > DRM_MODE_TV_MODE_NTSC_443. This is a very weird default (maybe it shouldn= 't be > the one that has a numeric value of 0?) and if there ever is a named mode= that > is not related to analog TV, it looks that it will refer to NTSC-443. >=20 > Not sure where could that actually propagate, and maybe what I'm saying c= an't > happen, but I'm imagining weird scenarios where a GPU that has both a > VGA/HDMI/whatever output, and a composite output, switches to NTSC-443 on= the > composite output by default because a named mode for the modern output is > selected. So, named modes are per-connector so the fact that there's another output doesn't really matter. Then, the answer is quite simple actually, the HDMI driver wouldn't register and use the TV mode property at all, so it would completely ignore it, no matter what value it has. So it's not really a concern. > Maybe something like DRM_MODE_TV_MODE_NONE =3D 0 would make sense? But I guess we can add it still. Maxime --a666jub4kxs6fn4h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYxYHmgAKCRDj7w1vZxhR xTGUAP9bRX6FEHBUM7XR2y0SEv7Im5MOyJ9Xu+nxahCL5Zr27gEAtUuO35mNsB/a iZZfvcVDyPB/1iJJ1p/8F2uKg1G0pQI= =y2zk -----END PGP SIGNATURE----- --a666jub4kxs6fn4h--