diff options
| author | Luca Ceresoli <luca.ceresoli@bootlin.com> | 2026-02-11 22:39:49 +0100 |
|---|---|---|
| committer | Liu Ying <victor.liu@nxp.com> | 2026-02-25 10:55:24 +0800 |
| commit | b99deb6157a13098223f551570c8d11545def0f4 (patch) | |
| tree | b52857752216abba391081f863c7f69e3ee561cd /tools/perf/scripts/python/task-analyzer.py | |
| parent | 645186bf86932c6b9deed2e564cffd09576ba9a4 (diff) | |
drm/bridge: imx8qxp-pixel-link: get/put the next bridge
This driver obtains a bridge pointer from of_drm_find_bridge() in the probe
function and stores it until driver removal. of_drm_find_bridge() is
deprecated, so move to of_drm_find_and_get_bridge() for the bridge to be
refcounted and use bridge->next_bridge to put the reference on
deallocation.
To keep the code as simple and reliable as possible remove the intermediate
next_bridge and selected_bridge variables.
Get/put operations on the remaining pointer is pl->bridge.next_bridge,
which is tied to the struct imx8qxp_pixel_link lifetime, are:
- get reference when assigned (by of_drm_find_and_get_bridge())
- put reference before reassignment if reassignment happens
- put reference when the struct imx8qxp_pixel_link embedding the
struct drm_bridge is destroyed (struct drm_bridge::next_bridge)
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Acked-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20260211-drm-bridge-alloc-getput-drm_of_find_bridge-v6-1-651ddfd13bdb@bootlin.com
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
