Hi Maxime, On Fri, 8 Aug 2025 15:20:01 +0200 Luca Ceresoli <luca.ceres...@bootlin.com> wrote:
> > > Some drawbacks of current code are because at every DSI attach/detach, > > > the samsung-dsim does drm_bridge_add/remove() itself: > > > > > > * To me this looks like a bad design, the samsung-dsim is always > > > present and not hotpluggable, so why should it add/remove itself? > > > > > > * I have a debugfs patch to show in $BUDUGFS/dri/bridges_removed all > > > the removes bridges: bridges after drm_bridge_remove() but not yet > > > freed because refcount still > 0. But it causes crashes due to the > > > samsung-dsim going backwards from "removed" to "added", and further > > > hacks are needed to avoid this crash. I went back to my old debugfs series, updated it and sent a new iteration: https://lore.kernel.org/r/20250819-drm-bridge-debugfs-removed-v7-0-970702579...@bootlin.com There you can see the lines added to drm_bridge_add() for handing "un-removed" bridges. It's a few lines of code only, but I don't feel very happy with them. I look forward to knowing your opinion about those few lines. So there were 3 issues I mentioned as reasons for this patch to samsung-dsim (only purely technical ones, not counting the "looks like a bad design" reason): 1. debugfs needs special care for un-removed bridges: see this e-mail 2. interferes with .gone flag: ruled out, N/A 3. needs a horrible hack in hotplug-bridge No news about issue 3. I'm going to experiment with removing the hotplug-bridge but that will take time (as a prerequisite I most likely need to remove the "always connected" DSI connector first). Stay tuned... Best regards, Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com