OSDN Git Service

drm/mediatek: Don't support hdmi connector creation
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Tue, 30 Mar 2021 11:09:02 +0000 (13:09 +0200)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Thu, 1 Apr 2021 14:05:20 +0000 (22:05 +0800)
commit2e477391522354e763aa62ee3e281c1ad9e8eb1b
tree22f7495d73d02890b4b79214d42deee4f7ba1c4a
parent053d231f369ca05cd563ca9738b5a4c73908e697
drm/mediatek: Don't support hdmi connector creation

commit f01195148967 ("drm/mediatek: mtk_dpi: Create connector for bridges")
broke the display support for elm device since mtk_dpi calls
drm_bridge_attach with the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR
while mtk_hdmi does not yet support this flag.

Fix this by accepting DRM_BRIDGE_ATTACH_NO_CONNECTOR in bridge attachment.
Implement the drm_bridge_funcs .detect() and .get_edid() operations, and
call drm_bridge_hpd_notify() to report HPD. This provides the
necessary API to support disabling connector creation.

In addition, the field 'conn' is removed from the mtk_hdmi struct since
mtk_hdmi don't create a connector. It is replaced with a pointer
'curr_conn' that points to the current connector which can be access
through the global state.

This patch is inspired by a similar patch for bridge/synopsys/dw-hdmi.c:
commit ec971aaa6775
("drm: bridge: dw-hdmi: Make connector creation optional")
But with the difference that in mtk-hdmi only the option of not creating
a connector is supported.

Fixes: f01195148967 ("drm/mediatek: mtk_dpi: Create connector for bridges")
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_hdmi.c