]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: don't add components that are already in the queue
authorChen-Yu Tsai <wens@csie.org>
Sat, 14 Oct 2017 04:02:46 +0000 (12:02 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 16 Oct 2017 07:53:44 +0000 (09:53 +0200)
commit1d60aa0c34e59ed67b73fbf119c23d6827e872bc
tree7c6b119f9147c3246cbf4dfdc482e0863f2fc508
parent6e5cb4ddadb7c6d49d202d73582761ffabc258ba
drm/sun4i: don't add components that are already in the queue

Even though the components framework can handle duplicate entries,
the extra entries cause a lot more debug messages to be generated,
which would be confusing to developers not familiar with our driver
and the framework in general.

Instead, we can scan the relatively small queue and check if the
component to be added is already queued up. Since the display
pipelines are symmetrical (not considering the third display
pipeline on the A80), and we add components level by level, when
we get to the second instance at the same level, any shared downstream
components would already be in the queue.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171014040252.9621-2-wens@csie.org
drivers/gpu/drm/sun4i/sun4i_drv.c