Skip to content

Commit b46310e

Browse files
committed
drm/arcpgu: remove drm_encoder_slave
drm_encoder_slave is the old way to write bridge drivers, for i2c bridges only. It's deprecated, and definitely should not be used in new drivers. This has absolutely nothing to do with the new bridge driver infrastructure implemented by drm_bridge. What's even strange is that arcpgu doesn't even use any of this, it really only wants a plain normal drm_encoder. Nuke all the surplus real estate. v2: Actually git add after compile testing ... v3: Clarify commit message and stop including drm_encoder_slave.h. Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180117141755.16933-1-daniel.vetter@ffwll.ch
1 parent e56a0fb commit b46310e

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

‎drivers/gpu/drm/arc/arcpgu_hdmi.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
*/
1616

1717
#include <drm/drm_crtc.h>
18-
#include <drm/drm_encoder_slave.h>
18+
#include <drm/drm_encoder.h>
19+
#include <drm/drm_device.h>
1920

2021
#include "arcpgu.h"
2122

‎drivers/gpu/drm/arc/arcpgu_sim.c‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616

1717
#include <drm/drm_crtc_helper.h>
18-
#include <drm/drm_encoder_slave.h>
1918
#include <drm/drm_atomic_helper.h>
2019

2120
#include "arcpgu.h"
@@ -29,7 +28,6 @@
2928

3029
struct arcpgu_drm_connector {
3130
struct drm_connector connector;
32-
struct drm_encoder_slave *encoder_slave;
3331
};
3432

3533
static int arcpgu_drm_connector_get_modes(struct drm_connector *connector)
@@ -68,18 +66,18 @@ static struct drm_encoder_funcs arcpgu_drm_encoder_funcs = {
6866
int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np)
6967
{
7068
struct arcpgu_drm_connector *arcpgu_connector;
71-
struct drm_encoder_slave *encoder;
69+
struct drm_encoder *encoder;
7270
struct drm_connector *connector;
7371
int ret;
7472

7573
encoder = devm_kzalloc(drm->dev, sizeof(*encoder), GFP_KERNEL);
7674
if (encoder == NULL)
7775
return -ENOMEM;
7876

79-
encoder->base.possible_crtcs = 1;
80-
encoder->base.possible_clones = 0;
77+
encoder->possible_crtcs = 1;
78+
encoder->possible_clones = 0;
8179

82-
ret = drm_encoder_init(drm, &encoder->base, &arcpgu_drm_encoder_funcs,
80+
ret = drm_encoder_init(drm, encoder, &arcpgu_drm_encoder_funcs,
8381
DRM_MODE_ENCODER_VIRTUAL, NULL);
8482
if (ret)
8583
return ret;
@@ -101,21 +99,19 @@ int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np)
10199
goto error_encoder_cleanup;
102100
}
103101

104-
ret = drm_mode_connector_attach_encoder(connector, &encoder->base);
102+
ret = drm_mode_connector_attach_encoder(connector, encoder);
105103
if (ret < 0) {
106104
dev_err(drm->dev, "could not attach connector to encoder\n");
107105
drm_connector_unregister(connector);
108106
goto error_connector_cleanup;
109107
}
110108

111-
arcpgu_connector->encoder_slave = encoder;
112-
113109
return 0;
114110

115111
error_connector_cleanup:
116112
drm_connector_cleanup(connector);
117113

118114
error_encoder_cleanup:
119-
drm_encoder_cleanup(&encoder->base);
115+
drm_encoder_cleanup(encoder);
120116
return ret;
121117
}

0 commit comments

Comments
 (0)