All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Make HDMI state helpers handle odd max bpc requests
@ 2026-06-08 11:19 Nicolas Frattaroli
  2026-06-08 11:19 ` [PATCH 1/2] drm/display: hdmi: Only allow BPC values of 8, 10, 12 and 16 Nicolas Frattaroli
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Nicolas Frattaroli @ 2026-06-08 11:19 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Dmitry Baryshkov
  Cc: dri-devel, linux-kernel, kernel, Nicolas Frattaroli

With the "max bpc" KMS connector property, userspace can arbitrarily
restrict the upper end of the bits-per-component range. This is fine and
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 even
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 <nicolas.frattaroli@collabora.com>
---
Nicolas Frattaroli (2):
      drm/display: hdmi: Only allow BPC values of 8, 10, 12 and 16
      drm/display: hdmi: Round odd max_bpc down to even numbers

 drivers/gpu/drm/display/drm_hdmi_state_helper.c    | 12 +++-
 drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 71 ++++++++++++++++++++++
 2 files changed, 82 insertions(+), 1 deletion(-)
---
base-commit: be3e81d74654555fff2779d78848267bd50dcf51
change-id: 20260608-hdmi-max-bpc-fix-703019763834

Best regards,
--  
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-06-09 15:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-08 11:19 [PATCH 0/2] Make HDMI state helpers handle odd max bpc requests Nicolas Frattaroli
2026-06-08 11:19 ` [PATCH 1/2] drm/display: hdmi: Only allow BPC values of 8, 10, 12 and 16 Nicolas Frattaroli
2026-06-08 11:30   ` sashiko-bot
2026-06-08 11:46     ` Nicolas Frattaroli
2026-06-08 11:50       ` Nicolas Frattaroli
2026-06-08 11:19 ` [PATCH 2/2] drm/display: hdmi: Round odd max_bpc down to even numbers Nicolas Frattaroli
2026-06-09 12:51 ` [PATCH 0/2] Make HDMI state helpers handle odd max bpc requests Maxime Ripard
2026-06-09 15:46   ` Nicolas Frattaroli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.