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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CFD7C05027 for ; Thu, 26 Jan 2023 13:40:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237128AbjAZNkO (ORCPT ); Thu, 26 Jan 2023 08:40:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237109AbjAZNkL (ORCPT ); Thu, 26 Jan 2023 08:40:11 -0500 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BF4644BDE for ; Thu, 26 Jan 2023 05:40:08 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 0F8365C049F; Thu, 26 Jan 2023 08:40:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 26 Jan 2023 08:40:06 -0500 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=fm1; t=1674740406; x=1674826806; bh=CBiXFVMDAv Nxh7UYGmOLV494Qj440CJpCvkMHt7+Ygs=; b=o5ql+HZEfcWc61BRUIcf8UIHLt dcyrInVEzN8+WZLR5nhODmNIBLfjGWiZO+H9VBOiV4UjmVACFxVaBwqUaiWR5gxG EOZ0Z0cfqyHwsnUjC3G0BT8t0235p/89DabBQf2+RuQdFeg4ahOCi0LjpXSFOy0T 7lg/SYm8IJ1yifHbu3pZjHAyTSGDeExGlJdlNTXWRuBPmkIaDQv8wFaJqbkI0pxk Z4UHUkEfMj8gcRrR0woQmBt4QQploi/bBts8hddd7gEF43ddHW1Rus53AwL2mzqD bR06Jb17yQi/ZDBJURXUKjKhRmPgjRxjf2pASLsDv+LeBc9XwB+jjaYjowJA== 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= fm3; t=1674740406; x=1674826806; bh=CBiXFVMDAvNxh7UYGmOLV494Qj44 0CJpCvkMHt7+Ygs=; b=ewAn02uD4RyW9svtZMxx+E98pZJkv0iq+K8awNRjNd3A KMDTb9Fdck80XEnpdBjrfDGb4oru3VEL3LIBGubg/upHXc7GJx1hWJddDmmtD0GC 6a4w6qi2Qu4TBZFu02w1NxgyoZv2iJhJ7vpHC7DwpwiYOL2e6VA65RZ1wRbkapyn GgP3sWrfF+Y6v+jldDlgHRf/0ihSMIaT7+FgMvDBwsesfS5V1OopQzQWonxalj90 naozKJamSzN80W0RKff6Nx54vg0VhD+Af5W+7eCeavlKRkgaOBpy2i6+BqTy/Iwj 4VAVBJ9+qi3Xc7olJc0twzIP8Epm/BMDNHtsjAihjQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvgedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeetfefffefgkedtfefgledugfdtjeefjedvtddtkeetieffjedvgfehheff hfevudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Jan 2023 08:40:05 -0500 (EST) Date: Thu, 26 Jan 2023 14:40:03 +0100 From: Maxime Ripard To: Dave Stevenson Cc: Thomas Zimmermann , Emma Anholt , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 5/9] drm/vc4: hdmi: Rework the CSC matrices organization Message-ID: <20230126134003.74z4iazwcsyl4et7@houat> References: <20221207-rpi-hdmi-improvements-v1-0-6b15f774c13a@cerno.tech> <20221207-rpi-hdmi-improvements-v1-5-6b15f774c13a@cerno.tech> <5394a702-20ef-bada-4731-b720b810998d@suse.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uqgeyzk4fr7m4qsq" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --uqgeyzk4fr7m4qsq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Jan 11, 2023 at 05:00:41PM +0000, Dave Stevenson wrote: > Hi Thomas >=20 > Thanks for the review >=20 > On Wed, 11 Jan 2023 at 15:03, Thomas Zimmermann wro= te: > > > > Hi > > > > Am 07.12.22 um 17:07 schrieb Maxime Ripard: > > > From: Dave Stevenson > > > > > > The CSC matrices were stored as separate matrix for each colorspace, = and > > > if we wanted a limited or full RGB output. > > > > > > This created some gaps in our support and we would not always pick the > > > relevant matrix. > > > > > > Let's rework our data structure to store one per colorspace, and then= a > > > matrix for limited range and one for full range. This makes us add a = new > > > matrix to support full range BT709 YUV output, and drops the redundant > > > (but somehow different) BT709 YUV444 vs YUV422 matrix. > > > > The final sentence is confusing and I didn't understand how two > > different matrices can now be just one. >=20 > Two changes to accommodate the hardware requirements: >=20 > Firstly the driver was only defining > vc5_hdmi_csc_full_rgb_to_limited_yuv444_bt709 and > vc5_hdmi_csc_full_rgb_to_limited_yuv422_bt709. There was no matrix for > full_rgb_to_full_yuv_bt709, so that had to be added. >=20 > Secondly, for some reason when in 444 mode the hardware wants the > matrix rows in a different order. That is why > vc5_hdmi_csc_full_rgb_to_limited_yuv444_bt709 differed from > vc5_hdmi_csc_full_rgb_to_limited_yuv422_bt709 - it was a simple > reordering of the rows. >=20 > This patch dropped the special handling for 444, and in the process > programmed the wrong coefficients into the hardware :-( > Patch 6/9 then reintroduces this reordering, so really should be > squashed into the one patch. Thanks to both of you for that feedback. I've chosen a slightly different solution since I believe it still makes sens to have the swap patch separate. I've move the swap function introduction earlier and removed the two redundant matrices in that patch. And now, that patch doesn't drop any matrix anymore so I've removed the confusing part of the commit log. > Looking at my more recent work, it looks like I messed up on 6/9 too. > One of the patches on [1] corrects that row swapping for yuv444 - I > was obviously having a bad day. >=20 > Maxime: Are you OK to fix that up? I've squashed it in for the next revision Thanks! maxime --uqgeyzk4fr7m4qsq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCY9KCswAKCRDj7w1vZxhR xVZVAP9BUveF4g7kHJ31THWzenNzfC5tUhEdCsdRdQQs+9BCAQD/WEdo4PZs5TW5 iz/FvN1naNwFlq41Z/WAhNBhI3oSjgc= =a4Zh -----END PGP SIGNATURE----- --uqgeyzk4fr7m4qsq--