drm/mediatek: Provide ddc symlink in hdmi connector sysfs directory
authorAndrzej Pietrasiewicz <andrzej.p@collabora.com>
Wed, 31 Jul 2019 16:58:16 +0000 (18:58 +0200)
committerAndrzej Pietrasiewicz <andrzej.p@collabora.com>
Fri, 8 Nov 2019 08:35:59 +0000 (09:35 +0100)
Use the ddc pointer provided by the generic connector.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/
drivers/gpu/drm/mediatek/mtk_hdmi.c

index c79b1f8..f684947 100644 (file)
@@ -1300,9 +1300,10 @@ static int mtk_hdmi_bridge_attach(struct drm_bridge *bridge)
        struct mtk_hdmi *hdmi = hdmi_ctx_from_bridge(bridge);
        int ret;
 
-       ret = drm_connector_init(bridge->encoder->dev, &hdmi->conn,
-                                &mtk_hdmi_connector_funcs,
-                                DRM_MODE_CONNECTOR_HDMIA);
+       ret = drm_connector_init_with_ddc(bridge->encoder->dev, &hdmi->conn,
+                                         &mtk_hdmi_connector_funcs,
+                                         DRM_MODE_CONNECTOR_HDMIA,
+                                         hdmi->ddc_adpt);
        if (ret) {
                dev_err(hdmi->dev, "Failed to initialize connector: %d\n", ret);
                return ret;