drm/sun4i: tcon: Check for multiple paths between TCONs and backends
authorChen-Yu Tsai <wens@csie.org>
Fri, 8 Sep 2017 07:50:11 +0000 (15:50 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Sat, 9 Sep 2017 15:24:01 +0000 (17:24 +0200)
commit1469619d29d752759a2c9604a74091f92757830a
tree240da78970c002cf74673e7b9090a9e0a8230915
parentda82b8785eebb2a97daa0164ccdfaa85361c237f
drm/sun4i: tcon: Check for multiple paths between TCONs and backends

The patch b317fa3ba11a ("drm/sun4i: tcon: Find matching display backend
by device node matching") assumed a one-to-one mapping between TCONs
and backends. This turned out wrong, as we found muxing controls in the
TCON of the A31, and undocumented usage of the backend output selector
of the A20.

Make sun4i_tcon_find_engine() bail out if the current node has multiple
input connections.

Fixes: b317fa3ba11a ("drm/sun4i: tcon: Find matching display backend
      by device node matching")
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/20170908075016.18657-4-wens@csie.org
drivers/gpu/drm/sun4i/sun4i_tcon.c