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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92526C433F5 for ; Mon, 8 Nov 2021 15:02:11 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5673F6108B for ; Mon, 8 Nov 2021 15:02:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5673F6108B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=it0j84NEkNn3cY/lCFGDXSVfGG1nC6ljE7ggRpELAEE=; b=yUdtHLBkPO22VM8f2SN0GrLxXI cStBhj1fCue9mdrz9OfrU+QXBMBQUkuJ9mZ8pIDvr7ONLNzSoDY+TYBLwC1tHHQOL2mLB1fMT7PLC 3qV4aPqWECRatEvs9LvgTfSnzopR/TZP58+ptoCYzM23zIocSDiOMxNCvHt3W85JJ0xuzTTDRgM1S D/jW/XwCcaT8p8H6X6wdSvCgkK2lohDd5yBT9VMXUObujRAihwNgW+13yMVfqo5qKyk33RV+d+hbH B8Dnkyz6aCWYSC1JJY9yC0HVq3Gic/285l5OFG3sSCFetoICYXgO7oYJM0ElV39igkX7UG8GasKD5 fyFSPHEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mk67q-00Gknb-HK; Mon, 08 Nov 2021 14:59:59 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mk67e-00GkkO-9P; Mon, 08 Nov 2021 14:59:49 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 8C3A858089B; Mon, 8 Nov 2021 09:59:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 08 Nov 2021 09:59:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=8xAnXR5M2pgccDxgDHcsQoFJ3dq VROc3kmDiRvdyHNQ=; b=L379N1g3L7WdacAQbBZ35pwsOUT4J/NwnX7dQSv5CzB CbhnBtNRvRXkjJjvHDoQ5Xb7cIElF3AsaDvNqQZQZj6x54hdg1ll4clajo4KNaNu gNg4VYqn1CKm6vJL3JK9UWL6SkjKmzovn/Pfr853xq3r3ZdELHFxCU0Zi99ZBnrv /hdo12cbs2fB32BnGW8U4QJDfN6tTfF+x0eHRm8DiUhSEn8h1PLUBNTFxy4aXEkn nb3iTOsrdGFBwMRyWDGR5idREHoLI6qH09C+IHajLEPWYPLBMmWEYpAD3ydNC3Cz ZzRxKd0t0GAcy818VLAVOP3REr7ZcF4wK6lQl4So/hQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=8xAnXR 5M2pgccDxgDHcsQoFJ3dqVROc3kmDiRvdyHNQ=; b=fNm9LxqPCTaxt99wM+CUko RDuEO0HozN8rDzL4wcLliLpROmzodqXfMOdBgrrHl9OWMQiPUfn9tI65ZmyQeh5/ J6ydhFP1E9kjYAicN7fcHD0+iCILDqb+F6Sj3wzHYCBjtaEx1w3Acb7oQfeXlrdI iU00l1s26k4uqM2TkXslIbukJtF7628kaTO9mJUZ0doTroPbF8ht1oVywdtaodDM tf5G7Uj/h5mPyhPWmkXV7RQrHWzWIKIcjsTxwjCoG153UN7dZ0oZ46amp4x+WuoW /sDAu20CPxybVmhAyZ7WZ0/DFeEy7MqF9fdyRhEJOHA3Cn8Gw3Ap4+HtvDr+ooXQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddvgdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtudenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeejkeekffdtfffhhfevvddutefgtdeljeevffevvddvteegledtgfeghfehvdei ffenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Nov 2021 09:59:38 -0500 (EST) Date: Mon, 8 Nov 2021 15:59:35 +0100 From: Maxime Ripard To: Ville =?utf-8?B?U3lyasOkbMOk?= Cc: Emma Anholt , Neil Armstrong , David Airlie , dri-devel@lists.freedesktop.org, Andrzej Hajda , Thierry Reding , amd-gfx@lists.freedesktop.org, Benjamin Gaignard , Daniel Vetter , Phil Elwell , Jerome Brunet , Tim Gover , Dave Stevenson , Kevin Hilman , Jernej Skrabec , Jonathan Hunter , Jonas Karlman , Martin Blumenstingl , intel-gfx@lists.freedesktop.org, Rodrigo Vivi , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Dom Cobley , "Pan, Xinhui" , Robert Foss , Thomas Zimmermann , Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , Laurent Pinchart Subject: Re: [PATCH 01/13] drm/connector: Add define for HDMI 1.4 Maximum Pixel Rate Message-ID: <20211108145935.fhvq72k5bnrjeb3b@gilmour> References: <20211102145944.259181-1-maxime@cerno.tech> <20211102145944.259181-2-maxime@cerno.tech> <20211104084841.mjnennxgelacleaj@gilmour> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211108_065946_772575_01B2079D X-CRM114-Status: GOOD ( 27.65 ) 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="===============4736085190535830556==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4736085190535830556== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="u5n44bpbocthx4et" Content-Disposition: inline --u5n44bpbocthx4et Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 04, 2021 at 05:41:13PM +0200, Ville Syrj=E4l=E4 wrote: > On Thu, Nov 04, 2021 at 09:48:41AM +0100, Maxime Ripard wrote: > > Hi Ville, > >=20 > > On Wed, Nov 03, 2021 at 08:05:16PM +0200, Ville Syrj=E4l=E4 wrote: > > > On Wed, Nov 03, 2021 at 01:02:11PM +0200, Ville Syrj=E4l=E4 wrote: > > > > On Tue, Nov 02, 2021 at 03:59:32PM +0100, Maxime Ripard wrote: > > > > > --- a/drivers/gpu/drm/drm_edid.c > > > > > +++ b/drivers/gpu/drm/drm_edid.c > > > > > @@ -4966,7 +4966,7 @@ static void drm_parse_hdmi_forum_vsdb(struc= t drm_connector *connector, > > > > > u32 max_tmds_clock =3D hf_vsdb[5] * 5000; > > > > > struct drm_scdc *scdc =3D &hdmi->scdc; > > > > > =20 > > > > > - if (max_tmds_clock > 340000) { > > > > > + if (max_tmds_clock > DRM_HDMI_14_MAX_TMDS_CLK_KHZ) { > > > > > display->max_tmds_clock =3D max_tmds_clock; > > > > > DRM_DEBUG_KMS("HF-VSDB: max TMDS clock %d kHz\n", > > > > > display->max_tmds_clock); > > > > > diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/= gpu/drm/i915/display/intel_hdmi.c > > > > > index d2e61f6c6e08..0666203d52b7 100644 > > > > > --- a/drivers/gpu/drm/i915/display/intel_hdmi.c > > > > > +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c > > > > > @@ -2226,7 +2226,7 @@ int intel_hdmi_compute_config(struct intel_= encoder *encoder, > > > > > if (scdc->scrambling.low_rates) > > > > > pipe_config->hdmi_scrambling =3D true; > > > > > =20 > > > > > - if (pipe_config->port_clock > 340000) { > > > > > + if (pipe_config->port_clock > DRM_HDMI_14_MAX_TMDS_CLK_KHZ) { > > > > > pipe_config->hdmi_scrambling =3D true; > > > > > pipe_config->hdmi_high_tmds_clock_ratio =3D true; > > > > > } > > > >=20 > > > > All of that is HDMI 2.0 stuff. So this just makes it all super > > > > confusing IMO. Nak. > > >=20 > > > So reading throgh HDMI 1.4 again it does specify 340 MHz as some kind > > > of upper limit for the physical cable. But nowhere else is that number > > > really mentioned AFAICS. HDMI 2.0 does talk quite a bit about the 340 > > > Mcsc limit in various places. > > >=20 > > > I wonder what people would think of a couple of helpers like: > > > - drm_hdmi_{can,must}_use_scrambling() > > > - drm_hdmi_is_high_tmds_clock_ratio() > > > or something along those lines? At least with those the code would > > > read decently and I wouldn't have to wonder what this HDMI 1.4 TMDS > > > clock limit really is. > >=20 > > Patch 2 introduces something along those lines. > >=20 > > It doesn't cover everything though, we're using this define in vc4 to > > limit the available modes in mode_valid on HDMI controllers not > > 4k-capable >=20 > I wouldn't want to use this kind of define for those kinds of checks > anyway. If the hardware has specific limits in what kind of clocks it > can generate (or what it was validated for) IMO you should spell > those out explicitly instead of assuming they happen to match > some standard defined max value. AFAIK, in the vc4 case, this is the hardware limit. And there's other cases where it still seems to make sense to have that define: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/dri= vers/gpu/drm/drm_edid.c#n4978 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/dri= vers/gpu/drm/radeon/radeon_encoders.c#n385 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/dri= vers/gpu/drm/amd/amdgpu/amdgpu_connectors.c#n1174 etc.. Maxime --u5n44bpbocthx4et Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYYk7VwAKCRDj7w1vZxhR xXMgAQDnhMqR+evxrKBoJpC1Nd4kEZ4dT6uhRIbk5B86PNJztQD/c9fOYpIMx9ID px7xLl3B61kKbIVKVlnQO4kdunKyJw8= =VxQ1 -----END PGP SIGNATURE----- --u5n44bpbocthx4et-- --===============4736085190535830556== 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 --===============4736085190535830556==--