]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mediatek: Fix can't get component for external display plane.
authorYongqiang Niu <yongqiang.niu@mediatek.com>
Wed, 27 Nov 2019 10:04:19 +0000 (18:04 +0800)
committerCK Hu <ck.hu@mediatek.com>
Mon, 9 Dec 2019 01:29:05 +0000 (09:29 +0800)
commit7c554c912da9668e597dac8be32a0356a4363a44
treedcded1b8c41e29edf2adba44538efd3dde6581ae
parent7019437b11793d1ccea2663bb3cb2636032f4293
drm/mediatek: Fix can't get component for external display plane.

The original logic is ok for primary display, but will not find out
component for external display.

For example, plane->index is 6 for external display, but there are only
2 layer nr in external display, and this condition will never happen:
if (plane->index < (count + mtk_ddp_comp_layer_nr(comp)))

Fix this by using the offset of the plane to mtk_crtc->planes as index,
instead of plane->index.

Fixes: 1b355513358f ("drm/mediatek: Add helper to get component for a plane")
Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
drivers/gpu/drm/mediatek/mtk_drm_crtc.c