mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/4] drm/komeda: Use the bridge connector
@ 2026-11-24  9:41 Luo Liu
  2026-11-24  9:41 ` [PATCH v3 1/4] " Luo Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Luo Liu @ 2026-11-24  9:41 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
	Russell King, dri-devel
  Cc: Ayan Halder, Andrzej Hajda, Neil Armstrong, Robert Foss,
	Laurent Pinchart, Jonas Karlman, Jernej Skrabec, Kory Maincent,
	Luca Ceresoli, David Airlie, Simona Vetter, linux-kernel,
	cix-kernel-upstream, Wuyi.Shen

The first patch converts komeda to the new DRM bridge model. Bridges
following that model no longer create a connector themselves, so the
display driver attaches them with DRM_BRIDGE_ATTACH_NO_CONNECTOR and
creates one connector for the whole chain with
drm_bridge_connector_init().

The second patch fixes the teardown path that the conversion exposes.
drm_bridge_connector_init() creates the connector with
drmm_connector_init(), which provides no ->destroy hook and leaves the
cleanup to a managed action. The drm_mode_config_cleanup() call in
komeda_kms_detach(), and in the komeda_kms_attach() error paths, drops
the connector references directly, so drm_connector_free() ends up
calling the NULL ->destroy pointer.

Switching to drmm_mode_config_init() lets the core release the mode
configuration after the connector cleanup actions have run. The komeda
private objects are then finalized by walking the pipelines instead of
mode_config.privobj_list, which also holds the bridges that the encoder
cleanup releases.

The third patch fixes a latent interrupt race found in review. The IRQ
is still registered after komeda_kms_detach(), and the
komeda_kms_attach() error path, clear drm->dev_private, so a shared
interrupt can reach komeda_kms_irq_handler() and dereference a NULL
mdev. It is independent of the conversion.

The fourth patch fixes the tda998x bridge, which accepts the
connector-less attach flag but keeps using its own connector. In that
mode the connector is never initialised, so the bridge reads an empty
display_info and ELD and stays in DVI mode without sending hotplug
events. Use the connector provided to the detect and EDID read
operations, report hotplug through drm_bridge_hpd_notify() and
advertise interlaced mode support through the bridge.

Changes in v3:
- Add a fix for the tda998x bridge, which accepts
  DRM_BRIDGE_ATTACH_NO_CONNECTOR but keeps using its own connector.

Luo Liu (4):
  drm/komeda: Use the bridge connector
  drm/komeda: Use drmm_mode_config_init()
  drm/komeda: Free the IRQ before clearing dev_private
  drm/bridge: tda998x: fix DRM_BRIDGE_ATTACH_NO_CONNECTOR support

 drivers/gpu/drm/arm/display/Kconfig           |  2 +
 .../gpu/drm/arm/display/komeda/komeda_crtc.c  | 18 +++++-
 .../gpu/drm/arm/display/komeda/komeda_kms.c   | 39 ++++++-----
 .../gpu/drm/arm/display/komeda/komeda_kms.h   |  2 +-
 .../arm/display/komeda/komeda_private_obj.c   | 23 +++++--
 drivers/gpu/drm/bridge/tda998x_drv.c          | 64 +++++++++++++------
 6 files changed, 105 insertions(+), 43 deletions(-)

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
--
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH v3 0/4] drm/komeda: Use the bridge connector
@ 2026-11-24  9:39 Luo Liu
  2026-11-24  9:39 ` [PATCH v3 2/4] drm/komeda: Use drmm_mode_config_init() Luo Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Luo Liu @ 2026-11-24  9:39 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Liviu Dudau,
	Russell King, dri-devel
  Cc: Ayan Halder, Andrzej Hajda, Neil Armstrong, Robert Foss,
	Laurent Pinchart, Jonas Karlman, Jernej Skrabec, Kory Maincent,
	Luca Ceresoli, David Airlie, Simona Vetter, linux-kernel

The first patch converts komeda to the new DRM bridge model. Bridges
following that model no longer create a connector themselves, so the
display driver attaches them with DRM_BRIDGE_ATTACH_NO_CONNECTOR and
creates one connector for the whole chain with
drm_bridge_connector_init().

The second patch fixes the teardown path that the conversion exposes.
drm_bridge_connector_init() creates the connector with
drmm_connector_init(), which provides no ->destroy hook and leaves the
cleanup to a managed action. The drm_mode_config_cleanup() call in
komeda_kms_detach(), and in the komeda_kms_attach() error paths, drops
the connector references directly, so drm_connector_free() ends up
calling the NULL ->destroy pointer.

Switching to drmm_mode_config_init() lets the core release the mode
configuration after the connector cleanup actions have run. The komeda
private objects are then finalized by walking the pipelines instead of
mode_config.privobj_list, which also holds the bridges that the encoder
cleanup releases.

The third patch fixes a latent interrupt race found in review. The IRQ
is still registered after komeda_kms_detach(), and the
komeda_kms_attach() error path, clear drm->dev_private, so a shared
interrupt can reach komeda_kms_irq_handler() and dereference a NULL
mdev. It is independent of the conversion.

The fourth patch fixes the tda998x bridge, which accepts the
connector-less attach flag but keeps using its own connector. In that
mode the connector is never initialised, so the bridge reads an empty
display_info and ELD and stays in DVI mode without sending hotplug
events. Use the connector provided to the detect and EDID read
operations, report hotplug through drm_bridge_hpd_notify() and
advertise interlaced mode support through the bridge.

Changes in v3:
- Add a fix for the tda998x bridge, which accepts
  DRM_BRIDGE_ATTACH_NO_CONNECTOR but keeps using its own connector.

Luo Liu (4):
  drm/komeda: Use the bridge connector
  drm/komeda: Use drmm_mode_config_init()
  drm/komeda: Free the IRQ before clearing dev_private
  drm/bridge: tda998x: fix DRM_BRIDGE_ATTACH_NO_CONNECTOR support

 drivers/gpu/drm/arm/display/Kconfig           |  2 +
 .../gpu/drm/arm/display/komeda/komeda_crtc.c  | 18 +++++-
 .../gpu/drm/arm/display/komeda/komeda_kms.c   | 39 ++++++-----
 .../gpu/drm/arm/display/komeda/komeda_kms.h   |  2 +-
 .../arm/display/komeda/komeda_private_obj.c   | 23 +++++--
 drivers/gpu/drm/bridge/tda998x_drv.c          | 64 +++++++++++++------
 6 files changed, 105 insertions(+), 43 deletions(-)

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
--
2.25.1


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

end of thread, other threads:[~2026-11-24  9:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24  9:41 [PATCH v3 0/4] drm/komeda: Use the bridge connector Luo Liu
2026-11-24  9:41 ` [PATCH v3 1/4] " Luo Liu
2026-11-24  9:41 ` [PATCH v3 2/4] drm/komeda: Use drmm_mode_config_init() Luo Liu
2026-11-24  9:41 ` [PATCH v3 3/4] drm/komeda: Free the IRQ before clearing dev_private Luo Liu
2026-11-24  9:41 ` [PATCH v3 4/4] drm/bridge: tda998x: fix DRM_BRIDGE_ATTACH_NO_CONNECTOR support Luo Liu
  -- strict thread matches above, loose matches on Subject: below --
2026-11-24  9:39 [PATCH v3 0/4] drm/komeda: Use the bridge connector Luo Liu
2026-11-24  9:39 ` [PATCH v3 2/4] drm/komeda: Use drmm_mode_config_init() Luo Liu

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®