From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F3C9322DB7 for ; Thu, 18 Jun 2026 15:41:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781797273; cv=none; b=pkgDwUvnSjbWUJKB2FUu+zsmwXU/jkKgRmtnjeV74dcnmDNOgeZDK6dGH5uKYthy+arEdVZ7L4Dc3d/qEXSED1dE3jO/qILVKpMGAEC15xjUKzGQnEbWAIZDWrlCfomVkhSyP8sBnCNwRa5tAjtZZOMiyq1A6K3EBXeFRtddVME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781797273; c=relaxed/simple; bh=dUuOoNdViV8CjmdUDID6eYV3c2vjKIIMX7TRtsbA2VM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IYjMRJ2pZ/kiCJdDz8x8sfl+949XoKw7dCtt54KTPaXdGpIUo5wDWLm/alt/0t/TerNl7FjQ9D8aRozZXBBxV6txWND8jjDzfu0Wlf3Y3gPepbMFcsEAILj3yksSx1rPTrHlM3WFGBhtojgfjYMNxqGiT+MryDxbvKn0JaY1T7o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VlfDGryh; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VlfDGryh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9159A1F000E9; Thu, 18 Jun 2026 15:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781797272; bh=dUuOoNdViV8CjmdUDID6eYV3c2vjKIIMX7TRtsbA2VM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=VlfDGryhrVTHfKXvf+xQEyK0Ymu/PFyHBn7sXOOJzsEdvNITerXq1MOQjiPzwYvPa 7AZlfjlM1X5PtuVMwF7rHOfHM9LBJip48uIIFaxjt47eV3LvId88F2t9PAJo4RtCtJ GygFoODdogp/7ZxMAiTxi+g39Q7qYLQ/YfL54tDN64mJ9wYgfsvQ8mFVt2XVMTPT59 P3d5dGA/ExUbUF866Mg84r3RwFR/32308S72pK7Kte+UnMBphqZ3uEDZiImuSRmFxc I5nys/6SqBCsxKv27N0jSQvxy3xCqsqOStGTFM6WtHRuukjlToD3VSiT5wdovkFk8y pUnhnreyilHgQ== Date: Thu, 18 Jun 2026 17:41:09 +0200 From: Maxime Ripard To: Michel =?utf-8?Q?D=C3=A4nzer?= Cc: Nicolas Frattaroli , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: Re: [PATCH 0/2] Make HDMI state helpers handle odd max bpc requests Message-ID: <20260618-godlike-solid-booby-39ecd5@houat> References: <20260608-hdmi-max-bpc-fix-v1-0-6e8dcebc7274@collabora.com> <20260609-orthodox-cocky-bull-5ddef8@houat> <14be0bdb-982d-4cad-8624-944c69937de4@mailbox.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="srthbwwmhb5ccsxh" Content-Disposition: inline In-Reply-To: <14be0bdb-982d-4cad-8624-944c69937de4@mailbox.org> --srthbwwmhb5ccsxh Content-Type: text/plain; protected-headers=v1; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH 0/2] Make HDMI state helpers handle odd max bpc requests MIME-Version: 1.0 On Wed, Jun 10, 2026 at 09:45:54AM +0200, Michel D=E4nzer wrote: > On 6/9/26 14:51, Maxime Ripard wrote: > > On Mon, Jun 08, 2026 at 01:19:06PM +0200, Nicolas Frattaroli wrote: > >> With the "max bpc" KMS connector property, userspace can arbitrarily > >> restrict the upper end of the bits-per-component range. This is fine a= nd > >> good, except the HDMI state helpers never considered that max_bpc could > >> be influenced by a userspace setting, so assumed it'll always be an ev= en > >> value from the HDMI standards. > >> > >> This, unfortunately, is not the world we live in anymore. Patch 1 > >> corrects sink_supports_format_bpc to return false on BPCs outside of > >> what HDMI allows. Patch 2 then corrects handling of odd-numbered max > >> bpcs by rounding the loop start value down to an even number instead. = It > >> also adds a KUnit test to make sure nobody breaks this again in the > >> future. > >> > >> Signed-off-by: Nicolas Frattaroli > >=20 > > Do you have a bit more details on the world you live in? :) > >=20 > > In particular, why would erroring out on setting an odd value in > > atomic_set_property not work? >=20 > That doesn't make sense, since the "max bpc" property purely defines > an upper limit. Setting an odd value for it doesn't mean the kernel > has to use an odd effective bpc value, it can use any valid bpc <=3D the > "max bpc" property value. Ah, yes, of course. Thanks! Maxime --srthbwwmhb5ccsxh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCajQRjgAKCRAnX84Zoj2+ dnGjAYD9lrunuF+Emh1P1Wzag9p3dTmNRfHGQPldEGp/knXjTIfsSoW2p436g0VG dkgIGYsBgPdVytTXTogTRZu/VOwcaov5xT18vXKWsrEsTgtCojNKZ4z70zNcWiOl nRd+MrCGDw== =WYNm -----END PGP SIGNATURE----- --srthbwwmhb5ccsxh--