drm/i915: moved edid read from _force() to _get_modes()
Subsystems (2)
PATCH 1/1 drm/i915: moved edid read from _force() to _get_modes()
From: "Chrisanthus, Anitha" <[email protected]>
When the connector is forced ON and firmware EDID is provided, driver still tries to read the EDID from the sink device, this can increase the driver's start up time by ~25ms per attempt.
This change is to fix this problem.
By moving the point where we attempt to read EDID from the hdmi and dp _force functions to the corresponding _get_modes() functions we only attempt to read EDID if EDID firmware is not provided or if there is no valid EDID.
This change should have no effect on the general case where the EDID is normally read during the hdmi or dp _detect() call.
--- drivers/gpu/drm/i915/intel_dp.c | 31 +++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_hdmi.c | 14 ++++++++------ 2 files changed, 29 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +21 -10
@@ -4563,23 +4563,13 @@ intel_dp_force(struct drm_connector *connector) {struct intel_dp *intel_dp =intel_attached_dp (connector);struct intel_encoder *intel_encoder = &dp_to_dig_port (intel_dp)->base; -struct drm_i915_private *dev_priv =to_i915 (intel_encoder->base.dev); -enum intel_display_power_domain power_domain;DRM_DEBUG_KMS ("[CONNECTOR:%d:%s]\n" , connector->base.id, connector->name); -intel_dp_unset_edid (intel_dp);if (connector->status != connector_status_connected)return ; - power_domain =intel_display_port_aux_power_domain (intel_encoder); -intel_display_power_get (dev_priv, power_domain); - -intel_dp_set_edid (intel_dp); - -intel_display_power_put (dev_priv, power_domain); -if (intel_encoder->type !=INTEL_OUTPUT_EDP ) intel_encoder->type =INTEL_OUTPUT_DP ; }
@@ -4588,8 +4578,29 @@ static int intel_dp_get_modes(struct drm_connector *connector) {struct intel_connector *intel_connector =to_intel_connector (connector);struct edid *edid; +struct intel_dp *intel_dp =intel_attached_dp (connector); +struct intel_encoder *intel_encoder = &dp_to_dig_port (intel_dp)->base; +struct drm_i915_private *dev_priv =to_i915 (intel_encoder->base.dev); +enum intel_display_power_domain power_domain; edid = intel_connector->detect_edid; +if ((edid ==NULL ) && + (connector->status == connector_status_connected)) { + +intel_dp_unset_edid (intel_dp); + + power_domain = +intel_display_port_aux_power_domain (intel_encoder); +intel_display_power_get (dev_priv, power_domain); + +intel_dp_detect_dpcd (intel_dp); + +intel_dp_set_edid (intel_dp); + +intel_display_power_put (dev_priv, power_domain); + + edid = intel_connector->detect_edid; + }if (edid) {int ret =intel_connector_update_modes (connector, edid);if (ret)
drivers/gpu/drm/i915/intel_hdmi.c +8 -6
@@ -1520,12 +1520,9 @@ intel_hdmi_force(struct drm_connector *connector)DRM_DEBUG_KMS ("[CONNECTOR:%d:%s]\n" , connector->base.id, connector->name); -intel_hdmi_unset_edid (connector); -if (connector->status != connector_status_connected)return ; -intel_hdmi_set_edid (connector);hdmi_to_dig_port (intel_hdmi)->base.type =INTEL_OUTPUT_HDMI ; }
@@ -1534,9 +1531,14 @@ static int intel_hdmi_get_modes(struct drm_connector *connector)struct edid *edid; edid =to_intel_connector (connector)->detect_edid; -if (edid ==NULL ) -return 0 ; - +if ((edid ==NULL ) && + (connector->status == connector_status_connected)) { +intel_hdmi_unset_edid (connector); +intel_hdmi_set_edid (connector); + edid =to_intel_connector (connector)->detect_edid; +if (edid ==NULL ) +return 0 ; + }return intel_connector_update_modes (connector, edid); }
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: moved edid read from _force() to _get_modes()
== Series Details ==
== Series Details ==
Series: drm/i915: moved edid read from _force() to _get_modes()
URL : https://patchwork.freedesktop.org/series/17112/
State : success
== Summary ==
Series 17112v1 drm/i915: moved edid read from _force() to _get_modes()
https://patchwork.freedesktop.org/api/1.0/series/17112/revisions/1/mbox/
Test kms_force_connector_basic:
Subgroup force-connector-state:
dmesg-warn -> PASS (fi-ivb-3770)fi-bdw-5557u total:247 pass:233 dwarn:0 dfail:0 fail:0 skip:14 fi-bsw-n3050 total:247 pass:208 dwarn:0 dfail:0 fail:0 skip:39 fi-bxt-j4205 total:247 pass:225 dwarn:1 dfail:0 fail:0 skip:21 fi-bxt-t5700 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-j1900 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-n2820 total:247 pass:216 dwarn:0 dfail:0 fail:0 skip:31 fi-hsw-4770 total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19 fi-hsw-4770r total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19 fi-ilk-650 total:247 pass:195 dwarn:0 dfail:0 fail:0 skip:52 fi-ivb-3520m total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-ivb-3770 total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-kbl-7500u total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-skl-6260u total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13 fi-skl-6700hq total:247 pass:227 dwarn:0 dfail:0 fail:0 skip:20 fi-skl-6700k total:247 pass:224 dwarn:3 dfail:0 fail:0 skip:20 fi-skl-6770hq total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13 fi-snb-2520m total:247 pass:216 dwarn:0 dfail:0 fail:0 skip:31 fi-snb-2600 total:247 pass:215 dwarn:0 dfail:0 fail:0 skip:32
f45701ec502e5ee9682561be7578bd39741ad4bb drm-tip: 2016y-12m-21d-11h-52m-22s UTC integration manifest 591821d drm/i915: moved edid read from _force() to _get_modes()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3363/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 12 lines · Anitha Chrisanthus
From: "Chrisanthus, Anitha" <[email protected]>
When the connector is forced ON and firmware EDID is provided, driver still tries to read the EDID from the sink device, this can increase the driver's start up time by ~25ms per attempt.
This change is to fix this problem.
By moving the point where we attempt to read EDID from the hdmi and dp_forcefunctions to the corresponding_get_modes()functions we only attempt to read EDID if EDID firmware is not provided or if there is no valid EDID.
This change should have no effect on the general case where the EDID is normally read during the hdmi or dp_detect()call.
Someone should just move the EDID override stuff to happen at a lower level so that _all_ EDID parsing will see the override EDID.
Quoted 107 lines
Signed-off-by Chrisanthus, Anitha <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 31 +++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_hdmi.c | 14 ++++++++------ 2 files changed, 29 insertions(+), 16 deletions(-)drivers/gpu/drm/i915/intel_dp.c +21
-10@@ -4563,23 +4563,13 @@ intel_dp_force(struct drm_connector *connector) {struct intel_dp *intel_dp =intel_attached_dp (connector);struct intel_encoder *intel_encoder = &dp_to_dig_port (intel_dp)->base; -struct drm_i915_private *dev_priv =to_i915 (intel_encoder->base.dev); -enum intel_display_power_domain power_domain;DRM_DEBUG_KMS ("[CONNECTOR:%d:%s]\n" , connector->base.id, connector->name); -intel_dp_unset_edid (intel_dp);if (connector->status != connector_status_connected)return ; - power_domain =intel_display_port_aux_power_domain (intel_encoder); -intel_display_power_get (dev_priv, power_domain); - -intel_dp_set_edid (intel_dp); - -intel_display_power_put (dev_priv, power_domain); -if (intel_encoder->type !=INTEL_OUTPUT_EDP ) intel_encoder->type =INTEL_OUTPUT_DP ; }@@ -4588,8 +4578,29 @@ static int intel_dp_get_modes(struct drm_connector *connector) {struct intel_connector *intel_connector =to_intel_connector (connector);struct edid *edid; +struct intel_dp *intel_dp =intel_attached_dp (connector); +struct intel_encoder *intel_encoder = &dp_to_dig_port (intel_dp)->base; +struct drm_i915_private *dev_priv =to_i915 (intel_encoder->base.dev); +enum intel_display_power_domain power_domain; edid = intel_connector->detect_edid; +if ((edid ==NULL ) && + (connector->status == connector_status_connected)) { + +intel_dp_unset_edid (intel_dp); + + power_domain = +intel_display_port_aux_power_domain (intel_encoder); +intel_display_power_get (dev_priv, power_domain); + +intel_dp_detect_dpcd (intel_dp); + +intel_dp_set_edid (intel_dp); + +intel_display_power_put (dev_priv, power_domain); + + edid = intel_connector->detect_edid; + }if (edid) {int ret =intel_connector_update_modes (connector, edid);if (ret)drivers/gpu/drm/i915/intel_hdmi.c +8
-6@@ -1520,12 +1520,9 @@ intel_hdmi_force(struct drm_connector *connector)DRM_DEBUG_KMS ("[CONNECTOR:%d:%s]\n" , connector->base.id, connector->name); -intel_hdmi_unset_edid (connector); -if (connector->status != connector_status_connected)return ; -intel_hdmi_set_edid (connector);hdmi_to_dig_port (intel_hdmi)->base.type =INTEL_OUTPUT_HDMI ; }@@ -1534,9 +1531,14 @@ static int intel_hdmi_get_modes(struct drm_connector *connector)struct edid *edid; edid =to_intel_connector (connector)->detect_edid; -if (edid ==NULL ) -return 0 ; - +if ((edid ==NULL ) && + (connector->status == connector_status_connected)) { +intel_hdmi_unset_edid (connector); +intel_hdmi_set_edid (connector); + edid =to_intel_connector (connector)->detect_edid; +if (edid ==NULL ) +return 0 ; + }return intel_connector_update_modes (connector, edid); }Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx