diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-06-15 04:01:37 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-06-15 04:01:37 +0000 |
commit | 5ad70b3140f344969e4bc39510af8b5bf31b84c8 (patch) | |
tree | 944343ad90d60248157df35ed43e1e45e86917d8 /sys | |
parent | b3f4b3608e87b4fa3f383d23a477e31212f2765c (diff) |
drm/bridge: Fix improper bridge init order with pre_enable_prev_first
From Jagan Teki
45755ef11f0337110105d4a6a2cd6bdc278dffa0 in linux-6.6.y/6.6.33
e18aeeda0b6905c333df5a0566b99f5c84426098 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/drm_bridge.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/drm_bridge.c b/sys/dev/pci/drm/drm_bridge.c index ce490620986..e02c2923e91 100644 --- a/sys/dev/pci/drm/drm_bridge.c +++ b/sys/dev/pci/drm/drm_bridge.c @@ -694,11 +694,17 @@ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge, */ list_for_each_entry_from(next, &encoder->bridge_chain, chain_node) { - if (next->pre_enable_prev_first) { + if (!next->pre_enable_prev_first) { next = list_prev_entry(next, chain_node); limit = next; break; } + + if (list_is_last(&next->chain_node, + &encoder->bridge_chain)) { + limit = next; + break; + } } /* Call these bridges in reverse order */ @@ -781,7 +787,7 @@ void drm_atomic_bridge_chain_pre_enable(struct drm_bridge *bridge, /* Found first bridge that does NOT * request prev to be enabled first */ - limit = list_prev_entry(next, chain_node); + limit = next; break; } } |