Complete ddc symlink addition
Subsystems (5)
cover Complete ddc symlink addition
The series completes the process of adding ddc symlink in connector's sysfs directory: of the initial submission only the below patches are still pending, hence this resend. Rebased onto drm-misc-next as of 2020-01-02.
Andrzej Pietrasiewicz (4):
drm/tegra: Provide ddc symlink in output connector sysfs directory drm/vc4: Provide ddc symlink in connector sysfs directory
drm: zte: Provide ddc symlink in hdmi connector sysfs directory
drm: zte: Provide ddc symlink in vga connector sysfs directory
drivers/gpu/drm/tegra/hdmi.c | 7 ++++--- drivers/gpu/drm/tegra/sor.c | 7 ++++--- drivers/gpu/drm/vc4/vc4_hdmi.c | 12 ++++++++---- drivers/gpu/drm/zte/zx_hdmi.c | 6 ++++-- drivers/gpu/drm/zte/zx_vga.c | 6 ++++-- 5 files changed, 24 insertions(+), 14 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/4 drm/tegra: Provide ddc symlink in output connector sysfs directory
Use the ddc pointer provided by the generic connector.
--- drivers/gpu/drm/tegra/hdmi.c | 7 ++++--- drivers/gpu/drm/tegra/sor.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-)
drivers/gpu/drm/tegra/hdmi.c +4 -3
@@ -1430,9 +1430,10 @@ static int tegra_hdmi_init(struct host1x_client *client) hdmi->output.dev = client->dev; -drm_connector_init (drm, &hdmi->output.connector, - &tegra_hdmi_connector_funcs, -DRM_MODE_CONNECTOR_HDMIA ); +drm_connector_init_with_ddc (drm, &hdmi->output.connector, + &tegra_hdmi_connector_funcs, +DRM_MODE_CONNECTOR_HDMIA , + hdmi->output.ddc);drm_connector_helper_add (&hdmi->output.connector, &tegra_hdmi_connector_helper_funcs); hdmi->output.connector.dpms =DRM_MODE_DPMS_OFF ;
drivers/gpu/drm/tegra/sor.c +4 -3
@@ -2836,9 +2836,10 @@ static int tegra_sor_init(struct host1x_client *client) sor->output.dev = sor->dev; -drm_connector_init (drm, &sor->output.connector, - &tegra_sor_connector_funcs, - connector); +drm_connector_init_with_ddc (drm, &sor->output.connector, + &tegra_sor_connector_funcs, + connector, + sor->output.ddc);drm_connector_helper_add (&sor->output.connector, &tegra_sor_connector_helper_funcs); sor->output.connector.dpms =DRM_MODE_DPMS_OFF ;
Signature · 1 line
2.17.1
PATCH 2/4 drm/vc4: Provide ddc symlink in connector sysfs directory
In reply to Andrzej PietrasiewiczUse the ddc pointer provided by the generic connector.
--- drivers/gpu/drm/vc4/vc4_hdmi.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +8 -4
@@ -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, -struct drm_encoder *encoder) +struct drm_encoder *encoder, +struct i2c_adapter *ddc) {struct drm_connector *connector;struct vc4_hdmi_connector *hdmi_connector;
@@ -281,8 +282,10 @@ static struct drm_connector *vc4_hdmi_connector_init(struct drm_device *dev, hdmi_connector->encoder = encoder; -drm_connector_init (dev, connector, &vc4_hdmi_connector_funcs, -DRM_MODE_CONNECTOR_HDMIA ); +drm_connector_init_with_ddc (dev, connector, + &vc4_hdmi_connector_funcs, +DRM_MODE_CONNECTOR_HDMIA , + ddc);drm_connector_helper_add (connector, &vc4_hdmi_connector_helper_funcs);/* 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) DRM_MODE_ENCODER_TMDS, NULL);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)) { ret =PTR_ERR (hdmi->connector); goto err_destroy_encoder;
Signature · 1 line
2.17.1
PATCH 3/4 drm: zte: Provide ddc symlink in hdmi connector sysfs directory
In reply to Andrzej PietrasiewiczUse the ddc pointer provided by the generic connector.
--- drivers/gpu/drm/zte/zx_hdmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/zte/zx_hdmi.c +4 -2
@@ -319,8 +319,10 @@ static int zx_hdmi_register(struct drm_device *drm, struct zx_hdmi *hdmi) hdmi->connector.polled =DRM_CONNECTOR_POLL_HPD ; -drm_connector_init (drm, &hdmi->connector, &zx_hdmi_connector_funcs, -DRM_MODE_CONNECTOR_HDMIA ); +drm_connector_init_with_ddc (drm, &hdmi->connector, + &zx_hdmi_connector_funcs, +DRM_MODE_CONNECTOR_HDMIA , + &hdmi->ddc->adap);drm_connector_helper_add (&hdmi->connector, &zx_hdmi_connector_helper_funcs);
Signature · 1 line
2.17.1
PATCH 4/4 drm: zte: Provide ddc symlink in vga connector sysfs directory
In reply to Andrzej PietrasiewiczUse the ddc pointer provided by the generic connector.
--- drivers/gpu/drm/zte/zx_vga.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/zte/zx_vga.c +4 -2
@@ -165,8 +165,10 @@ static int zx_vga_register(struct drm_device *drm, struct zx_vga *vga) vga->connector.polled =DRM_CONNECTOR_POLL_HPD ; - ret =drm_connector_init (drm, connector, &zx_vga_connector_funcs, -DRM_MODE_CONNECTOR_VGA ); + ret =drm_connector_init_with_ddc (drm, connector, + &zx_vga_connector_funcs, +DRM_MODE_CONNECTOR_VGA , + &vga->ddc->adap);if (ret) {DRM_DEV_ERROR (dev,"failed to init connector: %d\n" , ret); goto clean_encoder;
Signature · 1 line
2.17.1