[PATCH 3/3] drm/exynos: dsi: Fix bridge chain handling

Boris Brezillon boris.brezillon at collabora.com
Tue Jan 7 13:34:16 UTC 2020


Hi Marek,

On Tue, 7 Jan 2020 10:11:43 +0100
Marek Szyprowski <m.szyprowski at samsung.com> wrote:

> Hi Boris,
> 
> Sorry, for the late reply, I've just got back from my prolonged Chrismas 
> holidays.
> 
> On 27.12.2019 15:41, Boris Brezillon wrote:
> > Commit 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked
> > list") patched the bridge chain logic to use a double-linked list instead
> > of a single-linked list. This change induced changes to the Exynos driver
> > which was manually resetting the encoder->bridge element to NULL to
> > control the enable/disable sequence of the bridge chain. During this
> > conversion, 2 bugs were introduced:
> >
> > 1/ list_splice() was used to move chain elements to our own internal
> >     chain, but list_splice() does not reset the source list to an empty
> >     state, leading to unexpected bridge hook calls when
> >     drm_bridge_chain_xxx() helpers were called by the core. Replacing
> >     the list_splice() call by list_splice_init() fixes this problem.
> >
> > 2/ drm_bridge_chain_xxx() helpers operate on the
> >     bridge->encoder->bridge_chain list, which is now empty. When the
> >     helper uses list_for_each_entry_reverse() we end up with no operation
> >     done which is not what we want. But that's even worse when the helper
> >     uses list_for_each_entry_from(), because in that case we end up in
> >     an infinite loop searching for the list head element which is no
> >     longer encoder->bridge_chain but exynos_dsi->bridge_chain. To address
> >     that problem we stop using the bridge chain helpers and call the
> >     hooks directly.
> >
> > Reported-by: Marek Szyprowski <m.szyprowski at samsung.com>
> > Fixes: 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list")
> > Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>  
> 
> Works fine on Exynos5250-based Arndale board.
> 
> Tested-by: Marek Szyprowski <m.szyprowski at samsung.com>

Thanks for testing, but can you also add your R-b (I need it to make
dim happy)? While you're at it, maybe you can review patch 2 (it's very
similar to this patch).


More information about the dri-devel mailing list