drm: Make the connector .detect() callback optional
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 29 Nov 2016 20:56:30 +0000 (22:56 +0200)
committerSean Paul <seanpaul@chromium.org>
Thu, 1 Dec 2016 15:05:53 +0000 (10:05 -0500)
Many drivers (21 to be exact) create connectors that are always
connected (for instance to an LVDS or DSI panel). Instead of forcing
them to implement a dummy .detect() handler, make the callback optional
and consider the connector as always connected in that case.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Vincent Abriou <vincent.abriou@st.com>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[seanpaul fixed small conflict in rcar-du/rcar_du_lvdscon.c]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
27 files changed:
drivers/gpu/drm/amd/amdgpu/dce_virtual.c
drivers/gpu/drm/arc/arcpgu_sim.c
drivers/gpu/drm/ast/ast_mode.c
drivers/gpu/drm/bochs/bochs_kms.c
drivers/gpu/drm/bridge/nxp-ptn3460.c
drivers/gpu/drm/bridge/parade-ps8622.c
drivers/gpu/drm/bridge/tc358767.c
drivers/gpu/drm/cirrus/cirrus_mode.c
drivers/gpu/drm/drm_probe_helper.c
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
drivers/gpu/drm/gma500/cdv_intel_lvds.c
drivers/gpu/drm/gma500/psb_intel_lvds.c
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c
drivers/gpu/drm/i915/intel_dsi.c
drivers/gpu/drm/imx/imx-ldb.c
drivers/gpu/drm/imx/imx-tve.c
drivers/gpu/drm/imx/parallel-display.c
drivers/gpu/drm/mediatek/mtk_dsi.c
drivers/gpu/drm/mgag200/mgag200_mode.c
drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c
drivers/gpu/drm/rockchip/dw-mipi-dsi.c
drivers/gpu/drm/shmobile/shmob_drm_crtc.c
drivers/gpu/drm/sti/sti_hda.c
drivers/gpu/drm/sun4i/sun4i_rgb.c
drivers/gpu/drm/sun4i/sun4i_tv.c
drivers/gpu/drm/tilcdc/tilcdc_panel.c
include/drm/drm_connector.h

index 81cbf0b05dff1849c8e753b13b645ff7284d4790..1d93e123532dcf5fcb6de01545132cbc9c8ea54b 100644 (file)
@@ -429,12 +429,6 @@ dce_virtual_dpms(struct drm_connector *connector, int mode)
        return 0;
 }
 
-static enum drm_connector_status
-dce_virtual_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static int
 dce_virtual_set_property(struct drm_connector *connector,
                         struct drm_property *property,
@@ -463,7 +457,6 @@ static const struct drm_connector_helper_funcs dce_virtual_connector_helper_func
 
 static const struct drm_connector_funcs dce_virtual_connector_funcs = {
        .dpms = dce_virtual_dpms,
-       .detect = dce_virtual_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .set_property = dce_virtual_set_property,
        .destroy = dce_virtual_destroy,
index 2bf06d71556af260ae3fac577ab17d872f379f9f..bca3a678c955c0377661c0f0919c42eb213531f3 100644 (file)
@@ -41,12 +41,6 @@ static int arcpgu_drm_connector_get_modes(struct drm_connector *connector)
        return count;
 }
 
-static enum drm_connector_status
-arcpgu_drm_connector_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static void arcpgu_drm_connector_destroy(struct drm_connector *connector)
 {
        drm_connector_unregister(connector);
@@ -61,7 +55,6 @@ arcpgu_drm_connector_helper_funcs = {
 static const struct drm_connector_funcs arcpgu_drm_connector_funcs = {
        .dpms = drm_helper_connector_dpms,
        .reset = drm_atomic_helper_connector_reset,
-       .detect = arcpgu_drm_connector_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .destroy = arcpgu_drm_connector_destroy,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
index 5957c3e659feeb7e4ead966b5912a1584d3bb2a9..e26c98f51eb401719771ea44c4e1ef7243424b41 100644 (file)
@@ -839,12 +839,6 @@ static void ast_connector_destroy(struct drm_connector *connector)
        kfree(connector);
 }
 
-static enum drm_connector_status
-ast_connector_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static const struct drm_connector_helper_funcs ast_connector_helper_funcs = {
        .mode_valid = ast_mode_valid,
        .get_modes = ast_get_modes,
@@ -853,7 +847,6 @@ static const struct drm_connector_helper_funcs ast_connector_helper_funcs = {
 
 static const struct drm_connector_funcs ast_connector_funcs = {
        .dpms = drm_helper_connector_dpms,
-       .detect = ast_connector_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .destroy = ast_connector_destroy,
 };
index 0b4e5d11704335888c0d6818a44d486675ee97ba..d5e63eff357b08bb6fcf4b5abb693e64d3c16366 100644 (file)
@@ -216,12 +216,6 @@ bochs_connector_best_encoder(struct drm_connector *connector)
        return NULL;
 }
 
-static enum drm_connector_status bochs_connector_detect(struct drm_connector
-                                                       *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static const struct drm_connector_helper_funcs bochs_connector_connector_helper_funcs = {
        .get_modes = bochs_connector_get_modes,
        .mode_valid = bochs_connector_mode_valid,
@@ -230,7 +224,6 @@ static const struct drm_connector_helper_funcs bochs_connector_connector_helper_
 
 static const struct drm_connector_funcs bochs_connector_connector_funcs = {
        .dpms = drm_helper_connector_dpms,
-       .detect = bochs_connector_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .destroy = drm_connector_cleanup,
 };
index f1a99938e924cd097a161caeb29bf7eb484667e5..27f98c518dde201f24d96022e584aad48fd0ecbb 100644 (file)
@@ -239,16 +239,9 @@ static const struct drm_connector_helper_funcs ptn3460_connector_helper_funcs =
        .get_modes = ptn3460_get_modes,
 };
 
-static enum drm_connector_status ptn3460_detect(struct drm_connector *connector,
-               bool force)
-{
-       return connector_status_connected;
-}
-
 static const struct drm_connector_funcs ptn3460_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
-       .detect = ptn3460_detect,
        .destroy = drm_connector_cleanup,
        .reset = drm_atomic_helper_connector_reset,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
index 6f7c2f9860d229361f455ff96adcd9e275f89fbb..ac8cc5b50d9f2a7720f49c03007a7f66208c801e 100644 (file)
@@ -477,16 +477,9 @@ static const struct drm_connector_helper_funcs ps8622_connector_helper_funcs = {
        .get_modes = ps8622_get_modes,
 };
 
-static enum drm_connector_status ps8622_detect(struct drm_connector *connector,
-                                                               bool force)
-{
-       return connector_status_connected;
-}
-
 static const struct drm_connector_funcs ps8622_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
-       .detect = ps8622_detect,
        .destroy = drm_connector_cleanup,
        .reset = drm_atomic_helper_connector_reset,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
index a7872400eed8009b78c9a68bde1a943a4631c426..de9ffb49e9f6fd016ba7824fab084c3d83cb58e4 100644 (file)
@@ -1038,12 +1038,6 @@ err:
        return ret;
 }
 
-static enum drm_connector_status
-tc_connector_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static void tc_bridge_pre_enable(struct drm_bridge *bridge)
 {
        struct tc_data *tc = bridge_to_tc(bridge);
@@ -1168,7 +1162,6 @@ static const struct drm_connector_helper_funcs tc_connector_helper_funcs = {
 static const struct drm_connector_funcs tc_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
-       .detect = tc_connector_detect,
        .destroy = drm_connector_cleanup,
        .reset = drm_atomic_helper_connector_reset,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
index 17c915d9a03e66731f9ec3451d261b08f9743d44..9a4a27c1afd2411ddfbd202b16a8003479d0f7ba 100644 (file)
@@ -498,12 +498,6 @@ static struct drm_encoder *cirrus_connector_best_encoder(struct drm_connector
        return NULL;
 }
 
-static enum drm_connector_status cirrus_vga_detect(struct drm_connector
-                                                  *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static void cirrus_connector_destroy(struct drm_connector *connector)
 {
        drm_connector_cleanup(connector);
@@ -517,7 +511,6 @@ static const struct drm_connector_helper_funcs cirrus_vga_connector_helper_funcs
 
 static const struct drm_connector_funcs cirrus_vga_connector_funcs = {
        .dpms = drm_helper_connector_dpms,
-       .detect = cirrus_vga_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .destroy = cirrus_connector_destroy,
 };
index f6b64d7d3528d742a9b36c4551fe7243f38b58d5..078d9703a4fe337c264cd768f297bf40264bacda 100644 (file)
@@ -152,6 +152,14 @@ void drm_kms_helper_poll_enable_locked(struct drm_device *dev)
 }
 EXPORT_SYMBOL(drm_kms_helper_poll_enable_locked);
 
+static enum drm_connector_status
+drm_connector_detect(struct drm_connector *connector, bool force)
+{
+       return connector->funcs->detect ?
+               connector->funcs->detect(connector, force) :
+               connector_status_connected;
+}
+
 /**
  * drm_helper_probe_single_connector_modes - get complete set of display modes
  * @connector: connector to probe
@@ -239,7 +247,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
                if (connector->funcs->force)
                        connector->funcs->force(connector);
        } else {
-               connector->status = connector->funcs->detect(connector, true);
+               connector->status = drm_connector_detect(connector, true);
        }
 
        /*
@@ -405,7 +413,7 @@ static void output_poll_execute(struct work_struct *work)
 
                repoll = true;
 
-               connector->status = connector->funcs->detect(connector, false);
+               connector->status = drm_connector_detect(connector, false);
                if (old_status != connector->status) {
                        const char *old, *new;
 
@@ -565,7 +573,7 @@ bool drm_helper_hpd_irq_event(struct drm_device *dev)
 
                old_status = connector->status;
 
-               connector->status = connector->funcs->detect(connector, false);
+               connector->status = drm_connector_detect(connector, false);
                DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n",
                              connector->base.id,
                              connector->name,
index e1dd75b181189bbc27f81eb92ad3f308b735aa2e..05a8ee10687967e323a1052545f0a4a4b89399e9 100644 (file)
@@ -58,17 +58,10 @@ static void fsl_dcu_drm_connector_destroy(struct drm_connector *connector)
        drm_connector_cleanup(connector);
 }
 
-static enum drm_connector_status
-fsl_dcu_drm_connector_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static const struct drm_connector_funcs fsl_dcu_drm_connector_funcs = {
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
        .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
        .destroy = fsl_dcu_drm_connector_destroy,
-       .detect = fsl_dcu_drm_connector_detect,
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .reset = drm_atomic_helper_connector_reset,
index ea733ab5b1e05376c97433e6b221886d1dce248f..5efdb7fbb7ee3ad01189b35d04550826e5fcbd36 100644 (file)
@@ -386,19 +386,6 @@ static void cdv_intel_lvds_mode_set(struct drm_encoder *encoder,
        REG_WRITE(PFIT_CONTROL, pfit_control);
 }
 
-/**
- * Detect the LVDS connection.
- *
- * This always returns CONNECTOR_STATUS_CONNECTED.
- * This connector should only have
- * been set up if the LVDS was actually connected anyway.
- */
-static enum drm_connector_status cdv_intel_lvds_detect(
-                               struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 /**
  * Return the list of DDC modes if available, or the BIOS fixed mode otherwise.
  */
@@ -521,7 +508,6 @@ static const struct drm_connector_helper_funcs
 
 static const struct drm_connector_funcs cdv_intel_lvds_connector_funcs = {
        .dpms = drm_helper_connector_dpms,
-       .detect = cdv_intel_lvds_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .set_property = cdv_intel_lvds_set_property,
        .destroy = cdv_intel_lvds_destroy,
index fd7c912548415f7b8b8996520e90422da5e03d74..483fdce74e39a0dfbbfcc8a98e13cd3dd1667652 100644 (file)
@@ -499,19 +499,6 @@ static void psb_intel_lvds_mode_set(struct drm_encoder *encoder,
        REG_WRITE(PFIT_CONTROL, pfit_control);
 }
 
-/*
- * Detect the LVDS connection.
- *
- * This always returns CONNECTOR_STATUS_CONNECTED.
- * This connector should only have
- * been set up if the LVDS was actually connected anyway.
- */
-static enum drm_connector_status psb_intel_lvds_detect(struct drm_connector
-                                                  *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 /*
  * Return the list of DDC modes if available, or the BIOS fixed mode otherwise.
  */
@@ -643,7 +630,6 @@ const struct drm_connector_helper_funcs
 
 const struct drm_connector_funcs psb_intel_lvds_connector_funcs = {
        .dpms = drm_helper_connector_dpms,
-       .detect = psb_intel_lvds_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .set_property = psb_intel_lvds_set_property,
        .destroy = psb_intel_lvds_destroy,
index d1f67a9d4d86ba44946dfac5bd482b6471858a66..12a18557c5fd71d459eb9bd23c80f8363d4c4172 100644 (file)
@@ -39,12 +39,6 @@ hibmc_connector_best_encoder(struct drm_connector *connector)
        return drm_encoder_find(connector->dev, connector->encoder_ids[0]);
 }
 
-static enum drm_connector_status hibmc_connector_detect(struct drm_connector
-                                                *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static const struct drm_connector_helper_funcs
        hibmc_connector_helper_funcs = {
        .get_modes = hibmc_connector_get_modes,
@@ -54,7 +48,6 @@ static const struct drm_connector_helper_funcs
 
 static const struct drm_connector_funcs hibmc_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
-       .detect = hibmc_connector_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .destroy = drm_connector_cleanup,
        .reset = drm_atomic_helper_connector_reset,
index 4e0d025490a397aec44963b84d9d19ac0ac1e12e..5b72c50d6f768f56a5619c42fb20a7cbfd0db64d 100644 (file)
@@ -1298,12 +1298,6 @@ static void intel_dsi_prepare(struct intel_encoder *intel_encoder,
        }
 }
 
-static enum drm_connector_status
-intel_dsi_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static int intel_dsi_get_modes(struct drm_connector *connector)
 {
        struct intel_connector *intel_connector = to_intel_connector(connector);
@@ -1407,7 +1401,6 @@ static const struct drm_connector_helper_funcs intel_dsi_connector_helper_funcs
 
 static const struct drm_connector_funcs intel_dsi_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
-       .detect = intel_dsi_detect,
        .late_register = intel_connector_register,
        .early_unregister = intel_connector_unregister,
        .destroy = intel_dsi_connector_destroy,
index b300998dce7dc870f9bc590c4b7c19d4e246a245..516d06490465429561bb4923a77645d7626e525d 100644 (file)
@@ -101,12 +101,6 @@ struct imx_ldb {
        const struct bus_mux *lvds_mux;
 };
 
-static enum drm_connector_status imx_ldb_connector_detect(
-               struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static void imx_ldb_ch_set_bus_format(struct imx_ldb_channel *imx_ldb_ch,
                                      u32 bus_format)
 {
@@ -397,7 +391,6 @@ static int imx_ldb_encoder_atomic_check(struct drm_encoder *encoder,
 static const struct drm_connector_funcs imx_ldb_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
-       .detect = imx_ldb_connector_detect,
        .destroy = imx_drm_connector_destroy,
        .reset = drm_atomic_helper_connector_reset,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
index 8fc088843e553c2def5353e74bdd47171824478e..3b602ee33c443a484e07b47d9e7d5aa280fa94de 100644 (file)
@@ -227,12 +227,6 @@ static int tve_setup_vga(struct imx_tve *tve)
                                 TVE_TVDAC_TEST_MODE_MASK, 1);
 }
 
-static enum drm_connector_status imx_tve_connector_detect(
-                               struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static int imx_tve_connector_get_modes(struct drm_connector *connector)
 {
        struct imx_tve *tve = con_to_tve(connector);
@@ -352,7 +346,6 @@ static int imx_tve_atomic_check(struct drm_encoder *encoder,
 static const struct drm_connector_funcs imx_tve_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
-       .detect = imx_tve_connector_detect,
        .destroy = imx_drm_connector_destroy,
        .reset = drm_atomic_helper_connector_reset,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
index d796ada2a47aba793ace3968454688ce134fcb3f..8582a83c0d9b27f8b65b904d704324e6997f02ae 100644 (file)
@@ -49,12 +49,6 @@ static inline struct imx_parallel_display *enc_to_imxpd(struct drm_encoder *e)
        return container_of(e, struct imx_parallel_display, encoder);
 }
 
-static enum drm_connector_status imx_pd_connector_detect(
-               struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static int imx_pd_connector_get_modes(struct drm_connector *connector)
 {
        struct imx_parallel_display *imxpd = con_to_imxpd(connector);
@@ -143,7 +137,6 @@ static int imx_pd_encoder_atomic_check(struct drm_encoder *encoder,
 static const struct drm_connector_funcs imx_pd_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
-       .detect = imx_pd_connector_detect,
        .destroy = imx_drm_connector_destroy,
        .reset = drm_atomic_helper_connector_reset,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
index 28b2044ed9f285ad7c1bf1441822c3bcd24d9196..30027b26a59f1fa217c0e4c76ec602815d484ebb 100644 (file)
@@ -562,12 +562,6 @@ static void mtk_dsi_encoder_enable(struct drm_encoder *encoder)
        mtk_output_dsi_enable(dsi);
 }
 
-static enum drm_connector_status mtk_dsi_connector_detect(
-       struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static int mtk_dsi_connector_get_modes(struct drm_connector *connector)
 {
        struct mtk_dsi *dsi = connector_to_dsi(connector);
@@ -584,7 +578,6 @@ static const struct drm_encoder_helper_funcs mtk_dsi_encoder_helper_funcs = {
 
 static const struct drm_connector_funcs mtk_dsi_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
-       .detect = mtk_dsi_connector_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .destroy = drm_connector_cleanup,
        .reset = drm_atomic_helper_connector_reset,
index 6b21cb27e1cc77fe0476017c26676c786c5bca8f..3a03ac4045d84136aa846a0b4c83a96336de7a67 100644 (file)
@@ -1658,12 +1658,6 @@ static struct drm_encoder *mga_connector_best_encoder(struct drm_connector
        return NULL;
 }
 
-static enum drm_connector_status mga_vga_detect(struct drm_connector
-                                                  *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static void mga_connector_destroy(struct drm_connector *connector)
 {
        struct mga_connector *mga_connector = to_mga_connector(connector);
@@ -1680,7 +1674,6 @@ static const struct drm_connector_helper_funcs mga_vga_connector_helper_funcs =
 
 static const struct drm_connector_funcs mga_vga_connector_funcs = {
        .dpms = drm_helper_connector_dpms,
-       .detect = mga_vga_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .destroy = mga_connector_destroy,
 };
index 64e9f0b86e58ac3200df6258a9414bc92336fda5..3bcfd161c53f2e90c38f6cb5ac79e449a8bda84e 100644 (file)
@@ -61,16 +61,9 @@ static const struct drm_connector_helper_funcs connector_helper_funcs = {
        .get_modes = rcar_du_lvds_connector_get_modes,
 };
 
-static enum drm_connector_status
-rcar_du_lvds_connector_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static const struct drm_connector_funcs connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .reset = drm_atomic_helper_connector_reset,
-       .detect = rcar_du_lvds_connector_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .destroy = drm_connector_cleanup,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
index ca22e5ee89ca00d110e2f7a9679c073ff88d0122..d9aa382bb62993cca297a1824b9072bf3358497e 100644 (file)
@@ -969,12 +969,6 @@ static struct drm_connector_helper_funcs dw_mipi_dsi_connector_helper_funcs = {
        .mode_valid = dw_mipi_dsi_mode_valid,
 };
 
-static enum drm_connector_status
-dw_mipi_dsi_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static void dw_mipi_dsi_drm_connector_destroy(struct drm_connector *connector)
 {
        drm_connector_unregister(connector);
@@ -984,7 +978,6 @@ static void dw_mipi_dsi_drm_connector_destroy(struct drm_connector *connector)
 static struct drm_connector_funcs dw_mipi_dsi_atomic_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
-       .detect = dw_mipi_dsi_detect,
        .destroy = dw_mipi_dsi_drm_connector_destroy,
        .reset = drm_atomic_helper_connector_reset,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
index 6547b1db460a23abf45d79a6df797c854deb5dc6..dddbdd62bed0b62c0f980b338f29e3d4b9b04242 100644 (file)
@@ -669,15 +669,8 @@ static void shmob_drm_connector_destroy(struct drm_connector *connector)
        drm_connector_cleanup(connector);
 }
 
-static enum drm_connector_status
-shmob_drm_connector_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static const struct drm_connector_funcs connector_funcs = {
        .dpms = drm_helper_connector_dpms,
-       .detect = shmob_drm_connector_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .destroy = shmob_drm_connector_destroy,
 };
index e7c243f70870292dbafdf3bb2f1919d0953b4efd..96f336dd0e29642d6b90ed93b1e2958e6a472c0f 100644 (file)
@@ -642,12 +642,6 @@ struct drm_connector_helper_funcs sti_hda_connector_helper_funcs = {
        .mode_valid = sti_hda_connector_mode_valid,
 };
 
-static enum drm_connector_status
-sti_hda_connector_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static int sti_hda_late_register(struct drm_connector *connector)
 {
        struct sti_hda_connector *hda_connector
@@ -665,7 +659,6 @@ static int sti_hda_late_register(struct drm_connector *connector)
 static const struct drm_connector_funcs sti_hda_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
-       .detect = sti_hda_connector_detect,
        .destroy = drm_connector_cleanup,
        .reset = drm_atomic_helper_connector_reset,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
index c3ff10f559cc4811755f764d6ebbfd999a8ee7e9..5380085b3c060cb8c8d8c49b15bb0c8b6f0731e1 100644 (file)
@@ -110,12 +110,6 @@ static struct drm_connector_helper_funcs sun4i_rgb_con_helper_funcs = {
        .mode_valid     = sun4i_rgb_mode_valid,
 };
 
-static enum drm_connector_status
-sun4i_rgb_connector_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static void
 sun4i_rgb_connector_destroy(struct drm_connector *connector)
 {
@@ -129,7 +123,6 @@ sun4i_rgb_connector_destroy(struct drm_connector *connector)
 
 static struct drm_connector_funcs sun4i_rgb_con_funcs = {
        .dpms                   = drm_atomic_helper_connector_dpms,
-       .detect                 = sun4i_rgb_connector_detect,
        .fill_modes             = drm_helper_probe_single_connector_modes,
        .destroy                = sun4i_rgb_connector_destroy,
        .reset                  = drm_atomic_helper_connector_reset,
index d430b331fed5c24395b8670070738160e3c76306..c6f47222e8fc733fb73e0a944b545cb0f7e266a8 100644 (file)
@@ -537,12 +537,6 @@ static struct drm_connector_helper_funcs sun4i_tv_comp_connector_helper_funcs =
        .mode_valid     = sun4i_tv_comp_mode_valid,
 };
 
-static enum drm_connector_status
-sun4i_tv_comp_connector_detect(struct drm_connector *connector, bool force)
-{
-       return connector_status_connected;
-}
-
 static void
 sun4i_tv_comp_connector_destroy(struct drm_connector *connector)
 {
@@ -551,7 +545,6 @@ sun4i_tv_comp_connector_destroy(struct drm_connector *connector)
 
 static struct drm_connector_funcs sun4i_tv_comp_connector_funcs = {
        .dpms                   = drm_atomic_helper_connector_dpms,
-       .detect                 = sun4i_tv_comp_connector_detect,
        .fill_modes             = drm_helper_probe_single_connector_modes,
        .destroy                = sun4i_tv_comp_connector_destroy,
        .reset                  = drm_atomic_helper_connector_reset,
index 2134bb20fbe9d169c6f238ae57cc2685c6e17ea9..e634201db821009acb1444f9ee899224f532c0b3 100644 (file)
@@ -144,13 +144,6 @@ static void panel_connector_destroy(struct drm_connector *connector)
        drm_connector_cleanup(connector);
 }
 
-static enum drm_connector_status panel_connector_detect(
-               struct drm_connector *connector,
-               bool force)
-{
-       return connector_status_connected;
-}
-
 static int panel_connector_get_modes(struct drm_connector *connector)
 {
        struct drm_device *dev = connector->dev;
@@ -197,7 +190,6 @@ static struct drm_encoder *panel_connector_best_encoder(
 static const struct drm_connector_funcs panel_connector_funcs = {
        .destroy            = panel_connector_destroy,
        .dpms               = drm_atomic_helper_connector_dpms,
-       .detect             = panel_connector_detect,
        .fill_modes         = drm_helper_probe_single_connector_modes,
        .reset              = drm_atomic_helper_connector_reset,
        .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
index 34f9741ebb5b3b3e0496ce7d7e1262b7e7fac55b..1218a0c002c04c7139261a2a25eaeb5520bb658b 100644 (file)
@@ -262,6 +262,9 @@ struct drm_connector_funcs {
         * connector due to a user request. force can be used by the driver to
         * avoid expensive, destructive operations during automated probing.
         *
+        * This callback is optional, if not implemented the connector will be
+        * considered as always being attached.
+        *
         * FIXME:
         *
         * Note that this hook is only called by the probe helper. It's not in