Commit 04a880fb authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz

drm/vc4: Provide ddc symlink in connector sysfs directory

Use the ddc pointer provided by the generic connector.
Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@collabora.com>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200102132300.24309-3-andrzej.p@collabora.com
parent bb9d681b
...@@ -267,7 +267,8 @@ static const struct drm_connector_helper_funcs vc4_hdmi_connector_helper_funcs = ...@@ -267,7 +267,8 @@ static const struct drm_connector_helper_funcs vc4_hdmi_connector_helper_funcs =
}; };
static struct drm_connector *vc4_hdmi_connector_init(struct drm_device *dev, static struct drm_connector *vc4_hdmi_connector_init(struct drm_device *dev,
struct drm_encoder *encoder) struct drm_encoder *encoder,
struct i2c_adapter *ddc)
{ {
struct drm_connector *connector; struct drm_connector *connector;
struct vc4_hdmi_connector *hdmi_connector; struct vc4_hdmi_connector *hdmi_connector;
...@@ -281,8 +282,10 @@ static struct drm_connector *vc4_hdmi_connector_init(struct drm_device *dev, ...@@ -281,8 +282,10 @@ static struct drm_connector *vc4_hdmi_connector_init(struct drm_device *dev,
hdmi_connector->encoder = encoder; hdmi_connector->encoder = encoder;
drm_connector_init(dev, connector, &vc4_hdmi_connector_funcs, drm_connector_init_with_ddc(dev, connector,
DRM_MODE_CONNECTOR_HDMIA); &vc4_hdmi_connector_funcs,
DRM_MODE_CONNECTOR_HDMIA,
ddc);
drm_connector_helper_add(connector, &vc4_hdmi_connector_helper_funcs); drm_connector_helper_add(connector, &vc4_hdmi_connector_helper_funcs);
/* Create and attach TV margin props to this connector. */ /* Create and attach TV margin props to this connector. */
...@@ -1395,7 +1398,8 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) ...@@ -1395,7 +1398,8 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
DRM_MODE_ENCODER_TMDS, NULL); DRM_MODE_ENCODER_TMDS, NULL);
drm_encoder_helper_add(hdmi->encoder, &vc4_hdmi_encoder_helper_funcs); drm_encoder_helper_add(hdmi->encoder, &vc4_hdmi_encoder_helper_funcs);
hdmi->connector = vc4_hdmi_connector_init(drm, hdmi->encoder); hdmi->connector =
vc4_hdmi_connector_init(drm, hdmi->encoder, hdmi->ddc);
if (IS_ERR(hdmi->connector)) { if (IS_ERR(hdmi->connector)) {
ret = PTR_ERR(hdmi->connector); ret = PTR_ERR(hdmi->connector);
goto err_destroy_encoder; goto err_destroy_encoder;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment