drm: rockchip: Rely on the default ->best_encoder() behavior
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 7 Jun 2016 11:48:05 +0000 (13:48 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 10 Jun 2016 15:24:37 +0000 (17:24 +0200)
All outputs have a 1:1 relationship between connectors and encoders
and the driver is relying on the atomic helpers: we can drop the custom
->best_encoder() implementations  and let the core call
drm_atomic_helper_best_encoder() for us.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-11-git-send-email-boris.brezillon@free-electrons.com
Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-12-git-send-email-boris.brezillon@free-electrons.com
drivers/gpu/drm/rockchip/dw-mipi-dsi.c
drivers/gpu/drm/rockchip/inno_hdmi.c

index dedc65b40f36c5abd16115dc23cce208d730152d..ca22e5ee89ca00d110e2f7a9679c073ff88d0122 100644 (file)
@@ -964,18 +964,9 @@ static enum drm_mode_status dw_mipi_dsi_mode_valid(
        return mode_status;
 }
 
-static struct drm_encoder *dw_mipi_dsi_connector_best_encoder(
-                                       struct drm_connector *connector)
-{
-       struct dw_mipi_dsi *dsi = con_to_dsi(connector);
-
-       return &dsi->encoder;
-}
-
 static struct drm_connector_helper_funcs dw_mipi_dsi_connector_helper_funcs = {
        .get_modes = dw_mipi_dsi_connector_get_modes,
        .mode_valid = dw_mipi_dsi_mode_valid,
-       .best_encoder = dw_mipi_dsi_connector_best_encoder,
 };
 
 static enum drm_connector_status
index f8b4feb60b256f6e21d8f36b8050c22c7fa02f3e..006260de9dbd22a0be6fda85e1c17ec8a04f1b44 100644 (file)
@@ -579,14 +579,6 @@ inno_hdmi_connector_mode_valid(struct drm_connector *connector,
        return MODE_OK;
 }
 
-static struct drm_encoder *
-inno_hdmi_connector_best_encoder(struct drm_connector *connector)
-{
-       struct inno_hdmi *hdmi = to_inno_hdmi(connector);
-
-       return &hdmi->encoder;
-}
-
 static int
 inno_hdmi_probe_single_connector_modes(struct drm_connector *connector,
                                       uint32_t maxX, uint32_t maxY)
@@ -613,7 +605,6 @@ static struct drm_connector_funcs inno_hdmi_connector_funcs = {
 static struct drm_connector_helper_funcs inno_hdmi_connector_helper_funcs = {
        .get_modes = inno_hdmi_connector_get_modes,
        .mode_valid = inno_hdmi_connector_mode_valid,
-       .best_encoder = inno_hdmi_connector_best_encoder,
 };
 
 static int inno_hdmi_register(struct drm_device *drm, struct inno_hdmi *hdmi)