mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Fix ycbcr_420_allowed inconsistency for HDMI bridges
@ 2024-12-16 22:54 Cristian Ciocaltea
  2024-12-16 22:54 ` [PATCH v3 1/2] drm/bridge-connector: Prioritize supported_formats over ycbcr_420_allowed Cristian Ciocaltea
  2024-12-16 22:54 ` [PATCH v3 2/2] drm/connector: hdmi: Validate supported_formats matches ycbcr_420_allowed Cristian Ciocaltea
  0 siblings, 2 replies; 10+ messages in thread
From: Cristian Ciocaltea @ 2024-12-16 22:54 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Dmitry Baryshkov
  Cc: kernel, dri-devel, linux-kernel

Bridges with DRM_BRIDGE_OP_HDMI set in drm_bridge->ops are expected to
rely on drm_bridge->supported_formats to advertise the supported
colorspaces, including HDMI_COLORSPACE_YUV420.

However, when drm_bridge_connector gets initialised, only
drm_bridge->ycbcr_420_allowed is considered in the process of adjusting
the drm_connector->ycbcr_420_allowed, which effectively discards the
formats advertised by the HDMI bridge.

This patchset tries to address the issue by prioritizing
supported_formats over ycbcr_420_allowed.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
Changes in v3:
- Simplified the inconsistency handling by overwriting ycbcr_420_allowed
  for HDMI bridges before adding them to the global bridge list
- Added a 2nd patch to check if supported_formats matches
  ycbcr_420_allowed on HDMI connector initialization (Dmitry)
- Link to v2: https://lore.kernel.org/r/20241206-bridge-conn-fmt-prio-v2-1-85c817529b88@collabora.com

Changes in v2:
- Wrapped HDMI_COLORSPACE_YUV420 flag in the BIT() macro to properly
  check its presence in supported_formats
- Ensured YUV420 gets removed from the bitmask passed to
  drmm_connector_hdmi_init() when ycbcr_420_allowed is not set
- Link to v1: https://lore.kernel.org/r/20241130-bridge-conn-fmt-prio-v1-1-146b663f17f3@collabora.com

---
Cristian Ciocaltea (2):
      drm/bridge-connector: Prioritize supported_formats over ycbcr_420_allowed
      drm/connector: hdmi: Validate supported_formats matches ycbcr_420_allowed

 drivers/gpu/drm/display/drm_bridge_connector.c | 8 ++++++--
 drivers/gpu/drm/drm_bridge.c                   | 4 ++++
 drivers/gpu/drm/drm_connector.c                | 3 +++
 3 files changed, 13 insertions(+), 2 deletions(-)
---
base-commit: f486c8aa16b8172f63bddc70116a0c897a7f3f02
change-id: 20241130-bridge-conn-fmt-prio-c517c1407ed5


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

end of thread, other threads:[~2024-12-24 18:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-16 22:54 [PATCH v3 0/2] Fix ycbcr_420_allowed inconsistency for HDMI bridges Cristian Ciocaltea
2024-12-16 22:54 ` [PATCH v3 1/2] drm/bridge-connector: Prioritize supported_formats over ycbcr_420_allowed Cristian Ciocaltea
2024-12-16 23:27   ` Dmitry Baryshkov
2024-12-17  0:38     ` Cristian Ciocaltea
2024-12-20  1:05       ` Dmitry Baryshkov
2024-12-24 18:37         ` Cristian Ciocaltea
2024-12-16 22:54 ` [PATCH v3 2/2] drm/connector: hdmi: Validate supported_formats matches ycbcr_420_allowed Cristian Ciocaltea
2024-12-16 23:26   ` Dmitry Baryshkov
2024-12-17 15:25   ` Maxime Ripard
2024-12-24 18:35     ` Cristian Ciocaltea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®