summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorLuca Ceresoli <luca.ceresoli@bootlin.com>2026-09-16 15:45:29 +0200
committerLuca Ceresoli <luca.ceresoli@bootlin.com>2026-09-28 09:40:09 +0200
commitb7797081ccfeaa0c94248f80699fb3bdba5b2e27 (patch)
tree5e61c4ce307facb958af2f49f1732e3312090696 /tools/perf/scripts/python/stackcollapse.py
parentaa8a8c7e4641ebcef02dd6fa387ca334857367f4 (diff)
downloadlinux-b7797081ccfeaa0c94248f80699fb3bdba5b2e27.tar.gz
linux-b7797081ccfeaa0c94248f80699fb3bdba5b2e27.zip
drm/panel: embed a drm_bridge into every drm_panel
Adding a drm_panel does currently not add a panel_bridge wrapping it. Usually the panel_bridge creation happens later, when some other driver (e.g. the previous bridge or the encoder) calls *_of_get_bridge() and the following element in the pipeline is a panel. This has some drawbacks: * the bridge API is currently the best practice to access various components of the pipeline, especially with complex cards where bridges can be combined in different ways on different hardware * the panel_bridge is not created in the context of the driver of the underlying physical device (the panel driver), but of some other driver * that other driver is not aware of whether the returned drm_bridge pointer is a panel_bridge created on the fly, a pre-existing panel_bridge or a non-panel bridge * removal of a panel_bridge requires calling drm_panel_bridge_remove(), but that other driver doesn't know whether this is needed because it doesn't know whether it has created a panel_bridge or not Other drivers call [a variant of] drm_panel_bridge_add(), which also has some of the above drawbacks. So far the current approach was working mostly because devm and drmm ensure the panel bridge would be dealloacted at some later point. However with the upcoming implementation of bridge hotplug and dynamic bridge lifetime this won't happen as needed. Switch to the new approach: embed a drm_bridge inside every drm_panel, which behaves just like the current drm_panel_bridge. Do this by adapting the panel_bridge code, doing the minimal adaptations needed. Currently drm_bridge and drm_panel have independent refcounted allocation. As they now become a single struct, just change drm_panel_get/put() to get/put the bridge. As a result, the refcount for a drm_bridge embedded in a drm_panel is: bridge.refcount == number of drm_bridge_get() calls + number of drm_panel_get() calls - number of drm_bridge_put() calls - number of drm_panel_put() calls Now drivers should progressively stop using the panel_bridge API. Until that happens, that API becomes now a wrapper to the new embedded drm_bridge: * drm_panel_bridge_add() and derivatives don't create a bridge, they just drm_bridge_get() and return a pointer to the existing one * drm_panel_bridge_remove() and devm_drm_panel_bridge_release() don't remove the bridge, they just drm-bridge_put() it * The other panel_bridge functions stack on those listed in the previous 2 bullets, so their behaviour is changed correspondingly; they include: - all drm_panel_bridge_add() variants - their removal counterparts - *_of_get_bridge(). Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patch.msgid.link/20260916-drm-bridge-every-panel-v3-5-83afb4f1a707@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions