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 824DB3E3D8B for ; Wed, 15 Jul 2026 08:55:22 +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=1784105726; cv=none; b=fhOLVkqAuoI5bvVLfxAoGQe12X1wB8JEg1tmcrITVJuEOEvRGGtYuXIOZdabA4+fDgyoHv9nxPxv7WAe30MK1xmRe2f8MXwSxtUtcGS19VY6Fss1tAUFMX3dlupysSGKwzt5h1l2Fgu/VDpx1hcuuR+E12LIoKas+bIXaC+QHog= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784105726; c=relaxed/simple; bh=hmCccIM4s+/41t9t4BQgmnyCmeNtyY2XogkF6t4xH3U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KW1ER4mnGEC2gMpoYgSF43KQzc31uPMNZBsdsxeQ1/H7bvc5DvE8qWGpbMnt07Qp3sKA9xi3BDbj81tV9Qoys6zldYgVb4JPoHzlQe0cob1PQRzX77ilmyqsH3CXxODwfncaJHRWtTw2e1RHk9Sy5Q2t8TEzD8xPZApcMdRXKYY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cECXb+VJ; 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="cECXb+VJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B99241F00A3E; Wed, 15 Jul 2026 08:55:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784105721; bh=Z3wUKrGG21PQMUu0kd7DBV0yHXAtkX/rwuwlWXDYxKw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=cECXb+VJoR+yj3jVqoQiYsUTp85S/mZ6iPkKHA8qdyfmKip6k0znsuyxCKjKXsCb1 hd8NEEs5A95KQ9zDQLBjmeugvDL5UuAgA9xIJD+iqFprTldJArH0l40sDaDMdCilrg 7UvTr0OkibOLlZebpv3bD9Kg6fwSB3u8Rc3RoEgPrD5EqyT2IYe7ytrGbWVgyhJQjq r6MxKuA3O65/qCzoleLgSwBnPk0RoqFUswD91pwLj5vP0yJ97ausjdWaF+TEOInrA8 6MQRitPOK6vDPdMG9Ni4k3YqIvTL2b1wFpFYYai//3KEfTfwzNfl8Z0oksLG6Xz1gO PAIE76Ets/1ag== Date: Wed, 15 Jul 2026 10:55:19 +0200 From: Maxime Ripard To: Cristian Ciocaltea Cc: Dmitry Baryshkov , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Sandy Huang , Heiko =?utf-8?Q?St=C3=BCbner?= , Andy Yan , Daniel Stone , Dave Stevenson , =?utf-8?B?TWHDrXJh?= Canal , Raspberry Pi Kernel Maintenance , kernel@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH v8 04/39] drm/connector: Add HDMI 2.0 scrambler infrastructure Message-ID: <20260715-ancient-zealous-eagle-b13e94@houat> References: <20260702-dw-hdmi-qp-scramb-v8-0-d79890d00b6a@collabora.com> <20260702-dw-hdmi-qp-scramb-v8-4-d79890d00b6a@collabora.com> <17753a1c-824a-4835-ac2d-8b2796bba1eb@collabora.com> <534b921c-638c-4fc3-b89e-5dfc1f269f96@collabora.com> <20260713-statuesque-nonchalant-seagull-b9c39d@houat> <91c3a825-3344-4ff5-8ea0-f8f057665b3f@collabora.com> 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="r5otlnmsebefwt2i" Content-Disposition: inline In-Reply-To: <91c3a825-3344-4ff5-8ea0-f8f057665b3f@collabora.com> --r5otlnmsebefwt2i Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v8 04/39] drm/connector: Add HDMI 2.0 scrambler infrastructure MIME-Version: 1.0 On Mon, Jul 13, 2026 at 01:23:00PM +0300, Cristian Ciocaltea wrote: > On 7/13/26 11:50 AM, Maxime Ripard wrote: > > On Thu, Jul 09, 2026 at 10:25:54PM +0300, Cristian Ciocaltea wrote: > >> On 7/3/26 11:54 PM, Cristian Ciocaltea wrote: > >>> On 7/3/26 5:34 PM, Dmitry Baryshkov wrote: > >>>> On Thu, Jul 02, 2026 at 05:46:17PM +0300, Cristian Ciocaltea wrote: > >>>>> Add the connector-level infrastructure to support HDMI 2.0 scrambli= ng: > >>>>> > >>>>> - A scrambler_supported flag to indicate whether the source support= s the > >>>>> scrambling capability, in which case the newly introduced > >>>>> .scrambler_{enable|disable}() callbacks in drm_connector_hdmi_fun= cs > >>>>> are mandatory > >>>> > >>>> Do we need a flag? What would it mean if the flag is set, but the > >>>> callbacks are not? Can we drop the flag and use the presence of the > >>>> callbacks as a way to identify that scrambler is enabled? > >>> > >>> The flag is intended to be set only within drmm_connector_hdmi_init_w= ith_caps() > >>> when drivers advertise HDMI 2.x capability, in which case it also ens= ures the > >>> callbacks are provided. =20 > >>> > >>> We could drop the flag and instead have the init helper clear the cal= lbacks if > >>> they were provided for HDMI 1.x. This might slightly reduce code rea= dability, > >>> as it relies on checking the presence of individual callbacks - espec= ially since > >>> we plan to extend this further with HDMI 2.1 support, providing four = or five > >>> additional FRL-specific callbacks. > >> > >> I tried to replace the flag with a helper that checks the presence of = (one of) > >> the callbacks, but it's not straightforward to unset those for non-HDM= I 2.x > >> cases since the hdmi_funcs argument is immutable. > >=20 > > I'm not sure why we would need to unset them. If the driver states that > > it support HDMI 2.0, then it needs to be there, if it doesn't, then who > > cares? it's not going to be used. We can log a warning that it's > > inconsistent I guess, but there's no need to actively remove it. >=20 > I was trying to address the use case where drivers provide the scrambler > callbacks despite not supporting HDMI 2.0. Scrambling got introduced with HDMI 2.0. That doesn't make sense, but it's not a total deal breaker, it's just going to be here unused. Hence why I was suggesting to put a warning there if you wanted to. > If we replace the scrambler_supported flag with a helper checking the > presence of the scrambler callbacks, then we would need to ensure the > callbacks do not exist in this case. Keep it simple: if (hdmi_version >=3D HDMI_VERSION_2_0) if (funcs->scrambler_enable) hdmi->scramblers_supported =3D true else return -EINVAL else drm_warn(warn, "Inconsistent HDMI version"); We don't need anything more than that. Maxime --r5otlnmsebefwt2i Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCaldK9gAKCRAnX84Zoj2+ dtiSAYCQu9KcWvuZmn9ga9LZdgJaVIDPuT7TU896zIyMgZrU9Y4Z7K/BVp+ja2wo PJPHb/MBgNa/bcF9LTNuobtKeO7OjWhTX9TRuccydJYn14FFBYI4MSwo9wgXvaoZ w3E2VgsTMA== =cc5C -----END PGP SIGNATURE----- --r5otlnmsebefwt2i--