Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+8 -11
+2 -1
drivers/gpu/drm/arc/arcpgu_hdmi.c
··· 15 15 */ 16 16 17 17 #include <drm/drm_crtc.h> 18 - #include <drm/drm_encoder_slave.h> 18 + #include <drm/drm_encoder.h> 19 + #include <drm/drm_device.h> 19 20 20 21 #include "arcpgu.h" 21 22
+6 -10
drivers/gpu/drm/arc/arcpgu_sim.c
··· 15 15 */ 16 16 17 17 #include <drm/drm_crtc_helper.h> 18 - #include <drm/drm_encoder_slave.h> 19 18 #include <drm/drm_atomic_helper.h> 20 19 21 20 #include "arcpgu.h" ··· 28 29 29 30 struct arcpgu_drm_connector { 30 31 struct drm_connector connector; 31 - struct drm_encoder_slave *encoder_slave; 32 32 }; 33 33 34 34 static int arcpgu_drm_connector_get_modes(struct drm_connector *connector) ··· 66 68 int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np) 67 69 { 68 70 struct arcpgu_drm_connector *arcpgu_connector; 69 - struct drm_encoder_slave *encoder; 71 + struct drm_encoder *encoder; 70 72 struct drm_connector *connector; 71 73 int ret; 72 74 ··· 74 76 if (encoder == NULL) 75 77 return -ENOMEM; 76 78 77 - encoder->base.possible_crtcs = 1; 78 - encoder->base.possible_clones = 0; 79 + encoder->possible_crtcs = 1; 80 + encoder->possible_clones = 0; 79 81 80 - ret = drm_encoder_init(drm, &encoder->base, &arcpgu_drm_encoder_funcs, 82 + ret = drm_encoder_init(drm, encoder, &arcpgu_drm_encoder_funcs, 81 83 DRM_MODE_ENCODER_VIRTUAL, NULL); 82 84 if (ret) 83 85 return ret; ··· 99 101 goto error_encoder_cleanup; 100 102 } 101 103 102 - ret = drm_mode_connector_attach_encoder(connector, &encoder->base); 104 + ret = drm_mode_connector_attach_encoder(connector, encoder); 103 105 if (ret < 0) { 104 106 dev_err(drm->dev, "could not attach connector to encoder\n"); 105 107 drm_connector_unregister(connector); 106 108 goto error_connector_cleanup; 107 109 } 108 - 109 - arcpgu_connector->encoder_slave = encoder; 110 110 111 111 return 0; 112 112 ··· 112 116 drm_connector_cleanup(connector); 113 117 114 118 error_encoder_cleanup: 115 - drm_encoder_cleanup(&encoder->base); 119 + drm_encoder_cleanup(encoder); 116 120 return ret; 117 121 }