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 D8E3FC00140 for ; Wed, 24 Aug 2022 15:28:00 +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=WuI6FD1dW6ewXwzsVtKOpjcXe/BdVNtvNASUY2z3eHo=; b=UEcEbavpOhbkFdJZGGRc+Rodcb pxTtnBw1FssbHeFyfAH2YqTbVXxZ7CFhvhdvBC3VUr+9yV1jpL+XrNrWU4G6tFyI5INjR1iwKwtFW imABojnAQR2LBfVyh+AvkanqNqySHLBpujUK1jEwWEHbY4ru40KRIvrrABUm9cvL85OYP8Rc91Epr plgCL9W2CmVMaAevThWuiVNGXnsU2oipAJWiVlQ/+nrLMucb4FbOgD+20BgQVF/8MfdMy+HvxuOBJ 9LM8spL3NMf5UYNA25+mywekJKliIhfdrzsXhXjxITaXotJ+xDH6Ww4XwsoYviFpkcnta77DV4F52 TSg16wyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQsH7-00E2Rk-CI; Wed, 24 Aug 2022 15:26:37 +0000 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQsH4-00E2O4-Gx; Wed, 24 Aug 2022 15:26:36 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 9567D2B05F68; Wed, 24 Aug 2022 11:26:24 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 24 Aug 2022 11:26:26 -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=1661354784; x=1661361984; bh=uVniGVlvs8 /VCkoClJeb3GLOoc5DfbVlVeAGhJHYCzs=; b=ZohUdrdOe6oHquhp58vsz1bBKW 7PpFcRZvPL5/30O13xXZ48fKIdvUtvG1UHo0EH0udeCa46ANWX4agHz7Hlw2ABGT +y6ATFBQDrmjhbqhDXs1KzWTURdH+I+3335K1QvFAEqphvIn7LfEMwRq5JZzfRrx 7HbXlTKMvyZWvBYXr4Rj9wse/5oVSKL8xLfYnulgrEyyoJqRa9QkdgI12kTmoPz5 +2qmb9ao+VNVrwDGxjkPNigJ6InaXp2U/CMi/D6/Kh6JcQncYn/upOydSlOr6Rn3 ps5WU3KRW1mK7R6a91x9uZqjx8564kP6YWr6+pazwtun/+n3xPuKAJkP5eFg== 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=1661354784; x=1661361984; bh=uVniGVlvs8/VCkoClJeb3GLOoc5D fbVlVeAGhJHYCzs=; b=CRNsZc8gHQ+ZxkLfpS8/NSRYjUVZVWKX2CXvZ4lWxP2+ 1We9Nm3TLIk9jbAQi/o4euGDgaGFMI07Hym7GVkcxJ86s916UPcq5uvETrct85lD eclNGZwxOIwiaRaSPagxYjSgqJPVuhjTBOKQDyCFDpkO/r50+ZbcayVbZnf/o2i4 TQ+SS7HtgbmZmLKcIRhuX0SaVtQKOmUw0D8DoB+abdUttrA3khr/NFqaL2uRTeWW k4FjjhLkPEEOXDL0FVTfVi2/vtw5O/8zLmTx5otNnOdWO7yuyY9cwFHrIuObc9Na NY+ceIMklapWHCgXIbrqkETFeFowp0eyRomr3lnjPQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejuddgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtudenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeejveefheefkeeiffegveelveetgffffeektdefuefhtedtgeejhefggedu ffffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 24 Aug 2022 11:26:21 -0400 (EDT) Date: Wed, 24 Aug 2022 17:26:19 +0200 From: Maxime Ripard To: Noralf =?utf-8?Q?Tr=C3=B8nnes?= Cc: Jernej Skrabec , Martin Blumenstingl , Chen-Yu Tsai , Philipp Zabel , Jerome Brunet , Samuel Holland , Thomas Zimmermann , Daniel Vetter , Emma Anholt , David Airlie , Maarten Lankhorst , Kevin Hilman , Neil Armstrong , linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Phil Elwell , Mateusz Kwiatkowski , linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven , Dave Stevenson , linux-amlogic@lists.infradead.org, dri-devel@lists.freedesktop.org, Dom Cobley Subject: Re: [PATCH v1 23/35] drm/vc4: vec: Convert to the new TV mode property Message-ID: <20220824152619.5def5b2puj5b2a3o@houat> References: <20220728-rpi-analog-tv-properties-v1-0-3d53ae722097@cerno.tech> <20220728-rpi-analog-tv-properties-v1-23-3d53ae722097@cerno.tech> <0255f7c6-0484-6456-350d-cf24f3fee5d6@tronnes.org> MIME-Version: 1.0 In-Reply-To: <0255f7c6-0484-6456-350d-cf24f3fee5d6@tronnes.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220824_082634_953226_02CCE17F X-CRM114-Status: GOOD ( 18.78 ) 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="===============0507280719168741981==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0507280719168741981== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="36wi22d63kleuedj" Content-Disposition: inline --36wi22d63kleuedj Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sat, Aug 20, 2022 at 07:22:48PM +0200, Noralf Tr=F8nnes wrote: > Den 29.07.2022 18.35, skrev Maxime Ripard: > > Now that the core can deal fine with analog TV modes, let's convert the= vc4 > > VEC driver to leverage those new features. > >=20 > > We've added some backward compatibility to support the old TV mode prop= erty > > and translate it into the new TV norm property. > >=20 > > Signed-off-by: Maxime Ripard > >=20 > > diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_ve= c.c >=20 > > static int vc4_vec_connector_get_modes(struct drm_connector *connector) > > { > > - struct drm_connector_state *state =3D connector->state; > > struct drm_display_mode *mode; > > =20 > > - mode =3D drm_mode_duplicate(connector->dev, > > - vc4_vec_tv_modes[state->tv.mode].mode); > > + mode =3D drm_mode_duplicate(connector->dev, &drm_mode_480i); > > + if (!mode) { > > + DRM_ERROR("Failed to create a new display mode\n"); > > + return -ENOMEM; > > + } > > + > > + drm_mode_probed_add(connector, mode); > > + > > + mode =3D drm_mode_duplicate(connector->dev, &drm_mode_576i); >=20 > Maybe the mode that matches tv.norm should be marked as preferred so > userspace knows which one to pick? I'm not sure how realistic that would be. Doing this based on the driver / cmdline preference is going to be fairly easy, but then it's a property, it's going to be updated, and we probably don't want to mess around the mode flags based on new property values? Maxime --36wi22d63kleuedj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYwZDGwAKCRDj7w1vZxhR xe5DAP9Z+ZFY+aCR73/Vff7dgZ2qWrSVvFjPY8E7F+CacQmV8wEA7ngIetY5PT9h 6Cpd1zevB5ugZR1rHGjakT3tMaM5Vgo= =YI0f -----END PGP SIGNATURE----- --36wi22d63kleuedj-- --===============0507280719168741981== 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 --===============0507280719168741981==--