OSDN Git Service

drm/drivers: drop redundant drm_edid_to_eld() calls
authorJani Nikula <jani.nikula@intel.com>
Wed, 1 Nov 2017 14:21:02 +0000 (16:21 +0200)
committerJani Nikula <jani.nikula@intel.com>
Tue, 7 Nov 2017 15:43:35 +0000 (17:43 +0200)
drm_add_edid_modes() now fills in the ELD automatically, so the calls to
drm_edid_to_eld() are redundant. Remove them.

All the other places are obvious, but nv50 has detached
drm_edid_to_eld() from the drm_add_edid_modes() call.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: CK Hu <ck.hu@mediatek.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Mark Yao <mark.yao@rock-chips.com>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/0959ca02b983afc9e74dd9acd190ba6e25f21678.1509545641.git.jani.nikula@intel.com
14 files changed:
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
drivers/gpu/drm/bridge/analogix-anx78xx.c
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
drivers/gpu/drm/i2c/tda998x_drv.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_modes.c
drivers/gpu/drm/mediatek/mtk_hdmi.c
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/radeon/radeon_connectors.c
drivers/gpu/drm/radeon/radeon_dp_mst.c
drivers/gpu/drm/rockchip/cdn-dp-core.c
drivers/gpu/drm/sti/sti_hdmi.c
drivers/gpu/drm/tegra/output.c
drivers/gpu/drm/vc4/vc4_hdmi.c

index f51b41f..126be9e 100644 (file)
@@ -358,7 +358,6 @@ static int amdgpu_connector_ddc_get_modes(struct drm_connector *connector)
        if (amdgpu_connector->edid) {
                drm_mode_connector_update_edid_property(connector, amdgpu_connector->edid);
                ret = drm_add_edid_modes(connector, amdgpu_connector->edid);
-               drm_edid_to_eld(connector, amdgpu_connector->edid);
                return ret;
        }
        drm_mode_connector_update_edid_property(connector, NULL);
index 9385eb0..ed12a7d 100644 (file)
@@ -977,8 +977,6 @@ static int anx78xx_get_modes(struct drm_connector *connector)
        }
 
        num_modes = drm_add_edid_modes(connector, anx78xx->edid);
-       /* Store the ELD */
-       drm_edid_to_eld(connector, anx78xx->edid);
 
 unlock:
        mutex_unlock(&anx78xx->lock);
index bf14214..a64ce71 100644 (file)
@@ -1910,8 +1910,6 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
                drm_mode_connector_update_edid_property(connector, edid);
                cec_notifier_set_phys_addr_from_edid(hdmi->cec_notifier, edid);
                ret = drm_add_edid_modes(connector, edid);
-               /* Store the ELD */
-               drm_edid_to_eld(connector, edid);
                kfree(edid);
        } else {
                dev_dbg(hdmi->dev, "failed to get edid\n");
index 4d1f45a..6098150 100644 (file)
@@ -1100,7 +1100,6 @@ static int tda998x_connector_get_modes(struct drm_connector *connector)
 
        drm_mode_connector_update_edid_property(connector, edid);
        n = drm_add_edid_modes(connector, edid);
-       drm_edid_to_eld(connector, edid);
 
        kfree(edid);
 
index 887953c..6fce082 100644 (file)
@@ -5865,7 +5865,6 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
                if (drm_add_edid_modes(connector, edid)) {
                        drm_mode_connector_update_edid_property(connector,
                                                                edid);
-                       drm_edid_to_eld(connector, edid);
                } else {
                        kfree(edid);
                        edid = ERR_PTR(-EINVAL);
index 951e834..b398466 100644 (file)
@@ -42,7 +42,6 @@ int intel_connector_update_modes(struct drm_connector *connector,
 
        drm_mode_connector_update_edid_property(connector, edid);
        ret = drm_add_edid_modes(connector, edid);
-       drm_edid_to_eld(connector, edid);
 
        return ret;
 }
index 3ff5027..b787910 100644 (file)
@@ -1222,7 +1222,6 @@ static int mtk_hdmi_conn_get_modes(struct drm_connector *conn)
        drm_mode_connector_update_edid_property(conn, edid);
 
        ret = drm_add_edid_modes(conn, edid);
-       drm_edid_to_eld(conn, edid);
        kfree(edid);
        return ret;
 }
index 2dbf62a..d8ddb73 100644 (file)
@@ -2688,7 +2688,6 @@ nv50_audio_enable(struct drm_encoder *encoder, struct drm_display_mode *mode)
        if (!drm_detect_monitor_audio(nv_connector->edid))
                return;
 
-       drm_edid_to_eld(&nv_connector->base, nv_connector->edid);
        memcpy(args.data, nv_connector->base.eld, sizeof(args.data));
 
        nvif_mthd(disp->disp, 0, &args,
@@ -3064,10 +3063,8 @@ nv50_mstc_get_modes(struct drm_connector *connector)
 
        mstc->edid = drm_dp_mst_get_edid(&mstc->connector, mstc->port->mgr, mstc->port);
        drm_mode_connector_update_edid_property(&mstc->connector, mstc->edid);
-       if (mstc->edid) {
+       if (mstc->edid)
                ret = drm_add_edid_modes(&mstc->connector, mstc->edid);
-               drm_edid_to_eld(&mstc->connector, mstc->edid);
-       }
 
        if (!mstc->connector.display_info.bpc)
                mstc->connector.display_info.bpc = 8;
index 2f642cb..9e45127 100644 (file)
@@ -392,7 +392,6 @@ static int radeon_ddc_get_modes(struct drm_connector *connector)
        if (radeon_connector->edid) {
                drm_mode_connector_update_edid_property(connector, radeon_connector->edid);
                ret = drm_add_edid_modes(connector, radeon_connector->edid);
-               drm_edid_to_eld(connector, radeon_connector->edid);
                return ret;
        }
        drm_mode_connector_update_edid_property(connector, NULL);
index ebdf1b8..1768926 100644 (file)
@@ -196,7 +196,6 @@ static int radeon_dp_mst_get_ddc_modes(struct drm_connector *connector)
        if (radeon_connector->edid) {
                drm_mode_connector_update_edid_property(&radeon_connector->base, radeon_connector->edid);
                ret = drm_add_edid_modes(&radeon_connector->base, radeon_connector->edid);
-               drm_edid_to_eld(&radeon_connector->base, radeon_connector->edid);
                return ret;
        }
        drm_mode_connector_update_edid_property(&radeon_connector->base, NULL);
index 275844d..ec999d9 100644 (file)
@@ -276,11 +276,9 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
 
                dp->sink_has_audio = drm_detect_monitor_audio(edid);
                ret = drm_add_edid_modes(connector, edid);
-               if (ret) {
+               if (ret)
                        drm_mode_connector_update_edid_property(connector,
                                                                edid);
-                       drm_edid_to_eld(connector, edid);
-               }
        }
        mutex_unlock(&dp->lock);
 
index 30f02d2..d190275 100644 (file)
@@ -976,7 +976,6 @@ static int sti_hdmi_connector_get_modes(struct drm_connector *connector)
 
        count = drm_add_edid_modes(connector, edid);
        drm_mode_connector_update_edid_property(connector, edid);
-       drm_edid_to_eld(connector, edid);
 
        kfree(edid);
        return count;
index 595d1ec..1480f6a 100644 (file)
@@ -36,7 +36,6 @@ int tegra_output_connector_get_modes(struct drm_connector *connector)
 
        if (edid) {
                err = drm_add_edid_modes(connector, edid);
-               drm_edid_to_eld(connector, edid);
                kfree(edid);
        }
 
index fa37a1c..9a9a6b4 100644 (file)
@@ -287,7 +287,6 @@ static int vc4_hdmi_connector_get_modes(struct drm_connector *connector)
 
        drm_mode_connector_update_edid_property(connector, edid);
        ret = drm_add_edid_modes(connector, edid);
-       drm_edid_to_eld(connector, edid);
        kfree(edid);
 
        return ret;