summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLuca Ceresoli <luca.ceresoli@bootlin.com>2025-06-06 10:41:20 +0200
committerMaxime Ripard <mripard@kernel.org>2025-06-06 15:50:22 +0200
commit85ad3e84105d44d0c67e3139c939e0c1047436aa (patch)
tree43c6e014a1e22b39138350e6f19bbc08208ecfd4 /include
parent1ee7e69292a6f296b2d78393ab409a5bdd65d4e0 (diff)
downloadlinux-next-85ad3e84105d44d0c67e3139c939e0c1047436aa.tar.gz
linux-next-85ad3e84105d44d0c67e3139c939e0c1047436aa.zip
drm/bridge: add a .destroy func
Some users of DRM bridges may need to execute specific code just before deallocation. As of now the only known user would be KUnit tests. Suggested-by: Maxime Ripard <mripard@kernel.org> Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://lore.kernel.org/r/20250606-drm-bridge-alloc-doc-test-v9-2-b5bf7b43ed92@bootlin.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_bridge.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index ecdeb90e5586..7f66f9018c10 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -78,6 +78,16 @@ struct drm_bridge_funcs {
enum drm_bridge_attach_flags flags);
/**
+ * @destroy:
+ *
+ * This callback is invoked when the bridge is about to be
+ * deallocated.
+ *
+ * The @destroy callback is optional.
+ */
+ void (*destroy)(struct drm_bridge *bridge);
+
+ /**
* @detach:
*
* This callback is invoked whenever our bridge is being detached from a