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 055373DF011 for ; Tue, 7 Jul 2026 11:23:29 +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=1783423411; cv=none; b=hLIUKHInMLLoxEVxoTWtaBVhN5JMgy7CCgfPkqUKKK/BPxcTWkb60Jm5sj43HQMUFnBysHAUEtrlHa93elTCVXxthn/UKjTBVQVtQz2WNyAgAVioR3kxpoYBgVYPoiz+AuzOWQssVLB0Dhif/OTstzUBlE1gz+hxjOLMq+LMtiE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783423411; c=relaxed/simple; bh=i3N33THeMvwOTF3PBa7RjGfx2/hZQk6vm8Zc2tjcDgc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f4EUN8baoiXEAzeCCw7867333QzMEc/AKnc66tAhRwLVCNWsgNRA7Vpyv42fIE/nM0DwFbf0tQBRkaTnQ2QS5QdJun+ORyfff2IfnYmxqFRdkU9fvZD1JiV16eTv2zypeqDt0pFgYgDgDJEbY1pjlqAFHVEFPSfR/SWjfzngKqs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BQemc0Hc; 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="BQemc0Hc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 097931F000E9; Tue, 7 Jul 2026 11:23:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783423409; bh=afXSRg97etRkliDeKDwVvpVp5Xi6PLbgojXLrd7azl4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=BQemc0Hcb7z76zOw4HQNzmV6OuUkLkYz3nAJOGTBVjD4CmPGM3a0a/v3yzIuTK1hv lHLF9SfroTOJXeVstYsTrw/yQFMbAaGa/ZulojRZGrEFkyjGzefPQ1jkFXOEl4YTqb r5VAb2xnTwZ+UxS1ruz0aXbAl0hOqxVSTt35l7AzGw9u+4dHfV6MILwLe0R0kFc94X B/CX/nf79hr5EIXnBQGy3Z2wHZi4D4sAEizpzQqeXSfvmEBIHhOWBAeY72MnufhuTH Cjge+N7xXFeno1f7PjTIK8LuSKFquj46J1tH1w3gan9L/dkw0lxx12V85Oa0RdeTeA Bjlx97QCa+u8g== Date: Tue, 7 Jul 2026 13:23:25 +0200 From: Maxime Ripard To: Cristian Ciocaltea Cc: 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 09/39] drm/display: hdmi-state-helper: Add fallback TMDS rate validation Message-ID: <20260707-venomous-helpful-magpie-b2962b@penduick> References: <20260702-dw-hdmi-qp-scramb-v8-0-d79890d00b6a@collabora.com> <20260702-dw-hdmi-qp-scramb-v8-9-d79890d00b6a@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="xqdhmpvohpfwe23c" Content-Disposition: inline In-Reply-To: <20260702-dw-hdmi-qp-scramb-v8-9-d79890d00b6a@collabora.com> --xqdhmpvohpfwe23c Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v8 09/39] drm/display: hdmi-state-helper: Add fallback TMDS rate validation MIME-Version: 1.0 Hi, On Thu, Jul 02, 2026 at 05:46:22PM +0300, Cristian Ciocaltea wrote: > Validate the computed TMDS character rate against > connector->hdmi.max_tmds_char_rate when no driver-specific > tmds_char_rate_valid() hook is provided. >=20 > This gives HDMI connectors a common fallback for rejecting modes whose > TMDS character rate exceeds the connector limit, while still allowing > drivers with custom validation requirements to implement their own > tmds_char_rate_valid() callback. >=20 > Signed-off-by: Cristian Ciocaltea > --- > drivers/gpu/drm/display/drm_hdmi_state_helper.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gp= u/drm/display/drm_hdmi_state_helper.c > index ce17eeefc2da..db76699093e8 100644 > --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c > +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c > @@ -566,6 +566,9 @@ hdmi_clock_valid(const struct drm_connector *connecto= r, > status =3D funcs->tmds_char_rate_valid(connector, mode, clock); > if (status !=3D MODE_OK) > return status; > + } else if (connector->hdmi.max_tmds_char_rate) { > + if (clock > connector->hdmi.max_tmds_char_rate) > + return MODE_CLOCK_HIGH; I think we should handle this the same way we do for info->max_tmds_clock: if it's set, we always check that before calling the driver. It reduces the boilerplate in drivers, and it's always a relevant check anyway. Maxime --xqdhmpvohpfwe23c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCakzhnwAKCRAnX84Zoj2+ dlQUAYDUyaRz2CLMNtPg+Ete4u3K2eX5wKEVc3xRNSnTNqYt+QTr77szt9RzsUj9 EqW9z60BfiKLufcvycQ8bIdbCUrO6y0nFPZeaJoYxyommDmZDGb1cLCKCrsLpmQX Q2l28KHXkA== =ruW9 -----END PGP SIGNATURE----- --xqdhmpvohpfwe23c--