• Dafna Hirschfeld's avatar
    drm/mediatek: Don't support hdmi connector creation · 2e477391
    Dafna Hirschfeld authored
    commit f0119514 ("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 ec971aaa
    ("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: f0119514 ("drm/mediatek: mtk_dpi: Create connector for bridges")
    Signed-off-by: default avatarDafna Hirschfeld <dafna.hirschfeld@collabora.com>
    Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: default avatarChun-Kuang Hu <chunkuang.hu@kernel.org>
    2e477391
mtk_hdmi.c 46.4 KB