drm: i915: Don't try detecting sinks on ports already in use
Subsystems (2)
RFC PATCH 1/1 drm: i915: Don't try detecting sinks on ports already in use
On systems where more than one connector is attached to the same port, the HPD pin is also shared, and attaching one connector will trigger a hotplug on every other connector on that port. But, according to the documentation, connectors sharing the port cannot be enabled simultaneously, such that we can abort the detection process early if another connector was detected succesfully.
This has the good side effect of preventing DP timeouts whenever something else is connected to the shared port, like below:
[drm:intel_dp_aux_ch [i915]] dp_aux_ch timeout status 0x7143003f [drm:drm_dp_dpcd_access] Too many retries, giving up. First error: -110
Since this reduces the overhead of the i915_hotplug_work_func, it may address the following vblank misses detected by the CI:
https://bugs.freedesktop.org/show_bug.cgi?id=100215
https://bugs.freedesktop.org/show_bug.cgi?id=100558
--- drivers/gpu/drm/i915/intel_display.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_dp.c | 3 +++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_hdmi.c | 3 +++ 4 files changed, 33 insertions(+)
drivers/gpu/drm/i915/intel_display.c +26 -0
@@ -11270,6 +11270,32 @@ static bool check_digital_port_conflicts(struct drm_atomic_state *state)return true; } +bool intel_shared_digital_port_in_use (struct drm_connector *conn) +{ +struct drm_connector *peer; +struct drm_connector_list_iter iter; +struct intel_encoder *enc =to_intel_connector (conn)->encoder; +int ret = false; + +drm_connector_list_iter_begin (conn->dev, &iter); +drm_for_each_connector_iter (peer, &iter) { +struct intel_encoder *peer_enc; + +if (peer == conn || + peer->status != connector_status_connected) +continue ; + + peer_enc =to_intel_connector (peer)->encoder; +if (peer_enc->port == enc->port) { + ret = true; +break ; + } + } +drm_connector_list_iter_end (&iter); + +return ret; +} +static void clear_intel_crtc_state (struct intel_crtc_state *crtc_state) {
drivers/gpu/drm/i915/intel_dp.c +3 -0
@@ -4628,6 +4628,9 @@ intel_dp_long_pulse(struct intel_connector *intel_connector)WARN_ON (!drm_modeset_is_locked (&connector->dev->mode_config.connection_mutex)); +if (intel_shared_digital_port_in_use (connector)) +return connector_status_disconnected; +intel_display_power_get (to_i915 (dev), intel_dp->aux_power_domain);/* Can't disconnect eDP, but you can close the lid... */
drivers/gpu/drm/i915/intel_drv.h +1 -0
@@ -1411,6 +1411,7 @@ int vlv_force_pll_on(struct drm_i915_private *dev_priv, enum pipe pipe, const struct dpll *dpll);void vlv_force_pll_off (struct drm_i915_private *dev_priv,enum pipe pipe);int lpt_get_iclkip (struct drm_i915_private *dev_priv); +bool intel_shared_digital_port_in_use (struct drm_connector *conn);/* modesetting asserts */ void assert_panel_unlocked(struct drm_i915_private *dev_priv,
drivers/gpu/drm/i915/intel_hdmi.c +3 -0
@@ -1527,6 +1527,9 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)DRM_DEBUG_KMS ("[CONNECTOR:%d:%s]\n" , connector->base.id, connector->name); +if (intel_shared_digital_port_in_use (connector)) +return connector_status_disconnected;; +intel_display_power_get (dev_priv,POWER_DOMAIN_GMBUS );intel_hdmi_unset_edid (connector);
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm: i915: Don't try detecting sinks on ports already in use
== Series Details ==
== Series Details ==
Series: drm: i915: Don't try detecting sinks on ports already in use
URL : https://patchwork.freedesktop.org/series/23299/
State : success
== Summary ==
Series 23299v1 drm: i915: Don't try detecting sinks on ports already in use
https://patchwork.freedesktop.org/api/1.0/series/23299/revisions/1/mbox/
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
fail -> PASS (fi-skl-6700k) fdo#100367
Test pm_rpm:
Subgroup basic-rte:
incomplete -> PASS (fi-bsw-n3050) fdo#100718fdo#100367 https://bugs.freedesktop.org/show_bug.cgi?id=100367
fdo#100718 https://bugs.freedesktop.org/show_bug.cgi?id=100718
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:422s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:430s fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:567s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:509s fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time:554s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:470s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:470s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:409s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:404s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:421s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:482s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:471s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:460s fi-kbl-7560u total:278 pass:267 dwarn:1 dfail:0 fail:0 skip:10 time:569s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:453s fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time:574s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:465s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:481s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:428s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:521s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time:400s
9bb844000d9412c2758b861ce7aee1e9546fccb9 drm-tip: 2017y-04m-20d-14h-46m-59s UTC integration manifest 5e41558 drm: i915: Don't try detecting sinks on ports already in use
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4526/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx