drm/i915: Add support for retrying hotplug
Subsystems (3)
PATCH v3 1/2 drm/i915: Add support for retrying hotplug
From: Imre Deak <[email protected]>
There is some scenarios that we are aware that sink probe can fail, so lets add the infrastructure to let hotplug() hook to request another probe after some time.
v2: Handle shared HPD pins (Imre)
v3: Rebased
--- drivers/gpu/drm/i915/display/intel_ddi.c | 12 ++-- drivers/gpu/drm/i915/display/intel_dp.c | 12 ++-- drivers/gpu/drm/i915/display/intel_hotplug.c | 59 +++++++++++++++----- drivers/gpu/drm/i915/display/intel_hotplug.h | 5 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 8 ++- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/intel_drv.h | 11 +++- 8 files changed, 80 insertions(+), 32 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +7 -5
@@ -4081,14 +4081,16 @@ static int intel_hdmi_reset_link(struct intel_encoder *encoder,return modeset_pipe (&crtc->base, ctx); } -static bool intel_ddi_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector) +static enum intel_hotplug_state +intel_ddi_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received) {struct drm_modeset_acquire_ctx ctx; -bool changed; +enum intel_hotplug_state state;int ret; - changed =intel_encoder_hotplug (encoder, connector); + state =intel_encoder_hotplug (encoder, connector, irq_received);drm_modeset_acquire_init (&ctx,0 );
@@ -4110,7 +4112,7 @@ static bool intel_ddi_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret); -return changed; +return state; } static struct intel_connector *
drivers/gpu/drm/i915/display/intel_dp.c +7 -5
@@ -4878,14 +4878,16 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,* retrain the link to get a picture. That's in case no * userspace component reacted to intermittent HPD dip. */ -static bool intel_dp_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector) +static enum intel_hotplug_state +intel_dp_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received) {struct drm_modeset_acquire_ctx ctx; -bool changed; +enum intel_hotplug_state state;int ret; - changed =intel_encoder_hotplug (encoder, connector); + state =intel_encoder_hotplug (encoder, connector, irq_received);drm_modeset_acquire_init (&ctx,0 );
@@ -4904,7 +4906,7 @@ static bool intel_dp_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret); -return changed; +return state; }static void intel_dp_check_service_irq (struct intel_dp *intel_dp)
drivers/gpu/drm/i915/display/intel_hotplug.c +46 -13
148 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_hotplug.h +3 -2
@@ -15,8 +15,9 @@ struct intel_connector;struct intel_encoder ;void intel_hpd_poll_init (struct drm_i915_private *dev_priv); -bool intel_encoder_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector); +enum intel_hotplug_state intel_encoder_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received);void intel_hpd_irq_handler (struct drm_i915_private *dev_priv,u32 pin_mask,u32 long_mask);void intel_hpd_init (struct drm_i915_private *dev_priv);
drivers/gpu/drm/i915/display/intel_sdvo.c +5 -3
@@ -1893,12 +1893,14 @@ static void intel_sdvo_enable_hotplug(struct intel_encoder *encoder) &intel_sdvo->hotplug_active, 2); } -static bool intel_sdvo_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector) +static enum intel_hotplug_state +intel_sdvo_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received) {intel_sdvo_enable_hotplug (encoder); -return intel_encoder_hotplug (encoder, connector); +return intel_encoder_hotplug (encoder, connector, irq_received); } static bool
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -4083,7 +4083,7 @@ static int i915_hpd_storm_ctl_show(struct seq_file *m, void *data)*/ synchronize_irq (dev_priv->drm.irq);flush_work (&dev_priv->hotplug.dig_port_work); -flush_work (&dev_priv->hotplug.hotplug_work); +flush_delayed_work (&dev_priv->hotplug.hotplug_work);seq_printf (m,"Threshold: %d\n" , hotplug->hpd_storm_threshold); seq_printf(m, "Detected: %s\n",
drivers/gpu/drm/i915/i915_drv.h +2 -1
@@ -163,7 +163,7 @@ enum hpd_pin {#define HPD_STORM_DEFAULT_THRESHOLD 50struct i915_hotplug { -struct work_struct hotplug_work; +struct delayed_work hotplug_work;struct {unsigned long last_jiffies;
@@ -175,6 +175,7 @@ struct i915_hotplug { } state; } stats[HPD_NUM_PINS ];u32 event_bits; +u32 retry_bits;struct delayed_work reenable_work;u32 long_port_mask;
drivers/gpu/drm/i915/intel_drv.h +9 -2
@@ -101,14 +101,21 @@ struct intel_fbdev {struct mutex hpd_lock; }; +enum intel_hotplug_state { +INTEL_HOTPLUG_NOCHANGE , +INTEL_HOTPLUG_CHANGED , +INTEL_HOTPLUG_RETRY , +}; +struct intel_encoder {struct drm_encoder base;enum intel_output_type type;enum port port;unsigned int cloneable; -bool (*hotplug)(struct intel_encoder *encoder, -struct intel_connector *connector); +enum intel_hotplug_state (*hotplug)(struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received);enum intel_output_type (*compute_output_type)(struct intel_encoder *,struct intel_crtc_state *,struct drm_connector_state *);
Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 2/2 drm/i915: Enable hotplug retry
Right now we are aware of two cases that needs another hotplug retry:
- Unpowered type-c dongles
- HDMI slow unplug
Both have a complete explanation in the code to schedule another run of the hotplug handler.
It could have more checks to just trigger the retry in those two specific cases but why would sink signal a long pulse if there is no change? Also the drawback of running the hotplug handler again is really low and that could fix another cases that we are not aware.
Also retrying for old DP ports(non-DDI) to make it consistent and not cause CI failures if those systems are connected to chamelium boards that will be used to simulate the issues reported in here.
v2: Also retrying for old DP ports(non-DDI)(Imre)
--- drivers/gpu/drm/i915/display/intel_ddi.c | 21 +++++++++++++++++ drivers/gpu/drm/i915/display/intel_dp.c | 3 +++ drivers/gpu/drm/i915/display/intel_hdmi.c | 28 ++++++++++++++++++++++- 3 files changed, 51 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_ddi.c +21 -0
@@ -4086,6 +4086,7 @@ intel_ddi_hotplug(struct intel_encoder *encoder, struct intel_connector *connector, bool irq_received) { +struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base);struct drm_modeset_acquire_ctx ctx;enum intel_hotplug_state state;int ret;
@@ -4112,6 +4113,26 @@ intel_ddi_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret); +/* +* Unpowered type-c dongles can take some time to boot and be +* responsible, so here giving some time to those dongles to power up +* and then retrying the probe. +* +* On many platforms the HDMI live state signal is known to be +* unreliable, so we can't use it to detect if a sink is connected or +* not. Instead we detect if it's connected based on whether we can +* read the EDID or not. That in turn has a problem during disconnect, +* since the HPD interrupt may be raised before the DDC lines get +* disconnected (due to how the required length of DDC vs. HPD +* connector pins are specified) and so we'll still be able to get a +* valid EDID. To solve this schedule another detection cycle if this +* time around we didn't detect any change in the sink's connection +* status. +*/ +if (state ==INTEL_HOTPLUG_NOCHANGE && irq_received && + !dig_port->dp.is_mst) + state =INTEL_HOTPLUG_RETRY ; +return state; }
drivers/gpu/drm/i915/display/intel_dp.c +3 -0
@@ -4906,6 +4906,9 @@ intel_dp_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret); +if (state ==INTEL_HOTPLUG_NOCHANGE && irq_received) + state =INTEL_HOTPLUG_RETRY ; +return state; }
drivers/gpu/drm/i915/display/intel_hdmi.c +27 -1
@@ -3143,6 +3143,32 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,DRM_DEBUG_KMS ("CEC notifier get failed\n" ); } +static enum intel_hotplug_state +intel_hdmi_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector,bool irq_received) +{ +enum intel_hotplug_state state; + + state =intel_encoder_hotplug (encoder, connector, irq_received); + +/* +* On many platforms the HDMI live state signal is known to be +* unreliable, so we can't use it to detect if a sink is connected or +* not. Instead we detect if it's connected based on whether we can +* read the EDID or not. That in turn has a problem during disconnect, +* since the HPD interrupt may be raised before the DDC lines get +* disconnected (due to how the required length of DDC vs. HPD +* connector pins are specified) and so we'll still be able to get a +* valid EDID. To solve this schedule another detection cycle if this +* time around we didn't detect any change in the sink's connection +* status. +*/ +if (state ==INTEL_HOTPLUG_NOCHANGE && irq_received) + state =INTEL_HOTPLUG_RETRY ; + +return state; +} +void intel_hdmi_init (struct drm_i915_private *dev_priv,i915_reg_t hdmi_reg,enum port port) {
@@ -3166,7 +3192,7 @@ void intel_hdmi_init(struct drm_i915_private *dev_priv, &intel_hdmi_enc_funcs,DRM_MODE_ENCODER_TMDS , "HDMI %c", port_name(port)); - intel_encoder->hotplug = intel_encoder_hotplug; + intel_encoder->hotplug = intel_hdmi_hotplug; intel_encoder->compute_config = intel_hdmi_compute_config;if (HAS_PCH_SPLIT (dev_priv)) { intel_encoder->disable = pch_disable_hdmi;
Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v3 2/2] drm/i915: Enable hotplug retry
Here a dmesg output of this patch working in a unpowered type-c dongle:
https://gist.github.com/zehortigoza/93c54b03fb65237cc1a2e193acef61a8
With the latest type-c patches from Imre it is becoming really hard to reproduce this but is still possible, also looks like due some internal error on the dongle it being re-discovered by USB sub-system.
I added this to the patches bellow have more log information:
https://gist.github.com/zehortigoza/baecabeb7097b9322723b6caf5a9ced5
Let me know if you think this or something similar should be squashed to this patch, I think it is not necessary.
Quoted 153 lines · José Roberto de Souza
Right now we are aware of two cases that needs another hotplug retry:
- Unpowered type-c dongles
- HDMI slow unplugBoth have a complete explanation in the code to schedule another run of the hotplug handler.
It could have more checks to just trigger the retry in those two specific cases but why would sink signal a long pulse if there is no change? Also the drawback of running the hotplug handler again is really low and that could fix another cases that we are not aware.
Also retrying for old DP ports(non-DDI) to make it consistent and not cause CI failures if those systems are connected to chamelium boards that will be used to simulate the issues reported in here.
v2: Also retrying for old DP ports(non-DDI)(Imre)
Cc Ville Syrjälä <[email protected]>Cc Imre Deak <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_ddi.c | 21 +++++++++++++++++ drivers/gpu/drm/i915/display/intel_dp.c | 3 +++ drivers/gpu/drm/i915/display/intel_hdmi.c | 28 ++++++++++++++++++++++- 3 files changed, 51 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_ddi.c +1
-0@@ -4086,6 +4086,7 @@ intel_ddi_hotplug(struct intel_encoder *encoder, struct intel_connector *connector, bool irq_received) { +struct intel_digital_port *dig_port =enc_to_dig_port (&encoder- >base);struct drm_modeset_acquire_ctx ctx;drivers/gpu/drm/i915/display/intel_ddi.c +3
-0enum intel_hotplug_state state;int ret;@@ -4112,6 +4113,26 @@ intel_ddi_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret); +/* +* Unpowered type-c dongles can take some time to boot and be +* responsible, so here giving some time to those dongles to power up
drivers/gpu/drm/i915/display/intel_ddi.c +4
-0+* and then retrying the probe. +* +* On many platforms the HDMI live state signal is known to be +* unreliable, so we can't use it to detect if a sink is connected or
drivers/gpu/drm/i915/display/intel_ddi.c +1
-0+* not. Instead we detect if it's connected based on whether we can
drivers/gpu/drm/i915/display/intel_ddi.c +1
-0+* read the EDID or not. That in turn has a problem during disconnect,
drivers/gpu/drm/i915/display/intel_ddi.c +1
-0+* since the HPD interrupt may be raised before the DDC lines get
drivers/gpu/drm/i915/display/intel_ddi.c +2
-0+* disconnected (due to how the required length of DDC vs. HPD +* connector pins are specified) and so we'll still be able to get a
drivers/gpu/drm/i915/display/intel_ddi.c +1
-0+* valid EDID. To solve this schedule another detection cycle if this
drivers/gpu/drm/i915/display/intel_ddi.c +1
-0+* time around we didn't detect any change in the sink's connection
drivers/gpu/drm/i915/display/intel_ddi.c +6
-0+* status. +*/ +if (state ==INTEL_HOTPLUG_NOCHANGE && irq_received && + !dig_port->dp.is_mst) + state =INTEL_HOTPLUG_RETRY ; +return state; }drivers/gpu/drm/i915/display/intel_dp.c +3
-0@@ -4906,6 +4906,9 @@ intel_dp_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret); +if (state ==INTEL_HOTPLUG_NOCHANGE && irq_received) + state =INTEL_HOTPLUG_RETRY ; +return state; }drivers/gpu/drm/i915/display/intel_hdmi.c +11
-0@@ -3143,6 +3143,32 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,DRM_DEBUG_KMS ("CEC notifier get failed\n" ); } +static enum intel_hotplug_state +intel_hdmi_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector,bool irq_received) +{ +enum intel_hotplug_state state; + + state =intel_encoder_hotplug (encoder, connector, irq_received); + +/* +* On many platforms the HDMI live state signal is known to be +* unreliable, so we can't use it to detect if a sink is connected or
drivers/gpu/drm/i915/display/intel_hdmi.c +1
-0+* not. Instead we detect if it's connected based on whether we can
drivers/gpu/drm/i915/display/intel_hdmi.c +1
-0+* read the EDID or not. That in turn has a problem during disconnect,
drivers/gpu/drm/i915/display/intel_hdmi.c +1
-0+* since the HPD interrupt may be raised before the DDC lines get
drivers/gpu/drm/i915/display/intel_hdmi.c +2
-0+* disconnected (due to how the required length of DDC vs. HPD +* connector pins are specified) and so we'll still be able to get a
drivers/gpu/drm/i915/display/intel_hdmi.c +1
-0+* valid EDID. To solve this schedule another detection cycle if this
drivers/gpu/drm/i915/display/intel_hdmi.c +1
-0+* time around we didn't detect any change in the sink's connection
drivers/gpu/drm/i915/display/intel_hdmi.c +9
-1+* status. +*/ +if (state ==INTEL_HOTPLUG_NOCHANGE && irq_received) + state =INTEL_HOTPLUG_RETRY ; + +return state; +} +void intel_hdmi_init (struct drm_i915_private *dev_priv,i915_reg_t hdmi_reg,enum port port) {@@ -3166,7 +3192,7 @@ void intel_hdmi_init(struct drm_i915_private *dev_priv, &intel_hdmi_enc_funcs,DRM_MODE_ENCODER_TMDS , "HDMI %c", port_name(port)); - intel_encoder->hotplug = intel_encoder_hotplug; + intel_encoder->hotplug = intel_hdmi_hotplug; intel_encoder->compute_config = intel_hdmi_compute_config;if (HAS_PCH_SPLIT (dev_priv)) {
Quoted 1 line
intel_encoder->disable=pch_disable_hdmi;
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v3 2/2] drm/i915: Enable hotplug retry
Quoted 11 lines · Jose
Here a dmesg output of this patch working in a unpowered type-c dongle:
https://gist.github.com/zehortigoza/93c54b03fb65237cc1a2e193acef61a8With the latest type-c patches from Imre it is becoming really hard to reproduce this but is still possible, also looks like due some internal error on the dongle it being re-discovered by USB sub-system.
I added this to the patches bellow have more log information:
https://gist.github.com/zehortigoza/baecabeb7097b9322723b6caf5a9ced5
Let me know if you think this or something similar should be squashed to this patch, I think it is not necessary.
FWIW, we've tested these on a WHL which is suffering from HDMI unplug still showing the display connected, and it's working fine now.
Signature · 5 lines
t _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Souza, Jose
Tested-by Timo AaltonenRe: [PATCH v3 2/2] drm/i915: Enable hotplug retry
Quoted 11 lines · Timo Aaltonen
Quoted 10 lines · Jose
Here a dmesg output of this patch working in a unpowered type-c dongle:
https://gist.github.com/zehortigoza/93c54b03fb65237cc1a2e193acef61a8With the latest type-c patches from Imre it is becoming really hard to
reproduce this but is still possible, also looks like due some internal
error on the dongle it being re-discovered by USB sub-system.
Quoted 10 lines
Quoted 5 lines
I added this to the patches bellow have more log information:
https://gist.github.com/zehortigoza/baecabeb7097b9322723b6caf5a9ced5
Let me know if you think this or something similar should be squashed
to this patch, I think it is not necessary.FWIW, we've tested these on a WHL which is suffering from HDMI unplug still showing the display connected, and it's working fine now.
Thanks, I will add your:
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v3 2/2] drm/i915: Enable hotplug retry
Quoted 18 lines · Jose
Quoted 17 lines · Timo Aaltonen
Quoted 15 lines · Jose
Here a dmesg output of this patch working in a unpowered type-c dongle:
https://gist.github.com/zehortigoza/93c54b03fb65237cc1a2e193acef61a8With the latest type-c patches from Imre it is becoming really hard to
reproduce this but is still possible, also looks like due some internal
error on the dongle it being re-discovered by USB sub-system.I added this to the patches bellow have more log information:
https://gist.github.com/zehortigoza/baecabeb7097b9322723b6caf5a9ced5
Let me know if you think this or something similar should be squashed
to this patch, I think it is not necessary.
Quoted 8 lines
Quoted 4 lines
FWIW, we've tested these on a WHL which is suffering from HDMI unplug still showing the display connected, and it's working fine now.
Thanks, I will add your:
Tested-by Timo Aaltonen <[email protected]>
That's fine. When can we expect these to land on dinq?
Signature · 5 lines
t _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v3 2/2] drm/i915: Enable hotplug retry
Quoted 26 lines · Timo Aaltonen
Quoted 25 lines · Jose
Quoted 23 lines · Timo Aaltonen
Quoted 11 lines · Jose
Here a dmesg output of this patch working in a unpowered type-c dongle:
https://gist.github.com/zehortigoza/93c54b03fb65237cc1a2e193acef61a8With the latest type-c patches from Imre it is becoming really hard
to
reproduce this but is still possible, also looks like due some internal
error on the dongle it being re-discovered by USB sub-system.Quoted 5 lines
I added this to the patches bellow have more log information:
https://gist.github.com/zehortigoza/baecabeb7097b9322723b6caf5a9ced5
Let me know if you think this or something similar should be squashed
to this patch, I think it is not necessary.FWIW, we've tested these on a WHL which is suffering from HDMI unplug
still showing the display connected, and it's working fine now.
Quoted 8 lines
Quoted 3 lines
Thanks, I will add your:
Tested-by Timo Aaltonen <[email protected]>That's fine. When can we expect these to land on dinq?
As soon as someone reviews it.
Imre can you review the the second patch? I will find someone to review the first one.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v3 2/2] drm/i915: Enable hotplug retry
In reply to José Roberto de SouzaQuoted 73 lines · José Roberto de Souza
Right now we are aware of two cases that needs another hotplug retry:
- Unpowered type-c dongles
- HDMI slow unplugBoth have a complete explanation in the code to schedule another run of the hotplug handler.
It could have more checks to just trigger the retry in those two specific cases but why would sink signal a long pulse if there is no change? Also the drawback of running the hotplug handler again is really low and that could fix another cases that we are not aware.
Also retrying for old DP ports(non-DDI) to make it consistent and not cause CI failures if those systems are connected to chamelium boards that will be used to simulate the issues reported in here.
v2: Also retrying for old DP ports(non-DDI)(Imre)
Cc Ville Syrjälä <[email protected]>Cc Imre Deak <[email protected]>Cc Jani Nikula <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>--- drivers/gpu/drm/i915/display/intel_ddi.c | 21 +++++++++++++++++ drivers/gpu/drm/i915/display/intel_dp.c | 3 +++ drivers/gpu/drm/i915/display/intel_hdmi.c | 28 ++++++++++++++++++++++- 3 files changed, 51 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/display/intel_ddi.c +21
-0@@ -4086,6 +4086,7 @@ intel_ddi_hotplug(struct intel_encoder *encoder, struct intel_connector *connector, bool irq_received) { +struct intel_digital_port *dig_port =enc_to_dig_port (&encoder->base);struct drm_modeset_acquire_ctx ctx;enum intel_hotplug_state state;int ret;@@ -4112,6 +4113,26 @@ intel_ddi_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret); +/* +* Unpowered type-c dongles can take some time to boot and be +* responsible, so here giving some time to those dongles to power up +* and then retrying the probe. +* +* On many platforms the HDMI live state signal is known to be +* unreliable, so we can't use it to detect if a sink is connected or +* not. Instead we detect if it's connected based on whether we can +* read the EDID or not. That in turn has a problem during disconnect, +* since the HPD interrupt may be raised before the DDC lines get +* disconnected (due to how the required length of DDC vs. HPD +* connector pins are specified) and so we'll still be able to get a +* valid EDID. To solve this schedule another detection cycle if this +* time around we didn't detect any change in the sink's connection +* status. +*/ +if (state ==INTEL_HOTPLUG_NOCHANGE && irq_received && + !dig_port->dp.is_mst) + state =INTEL_HOTPLUG_RETRY ; +return state; }drivers/gpu/drm/i915/display/intel_dp.c +0
-0
drivers/gpu/drm/i915/display/intel_dp.c intel_dp_hotplug(struct intel_encoder *encoder, · line 4907
Quoted 2 lines
drivers/gpu/drm/i915/display/intel_dp.c +0
-0@@ -4906,6 +4906,9 @@ intel_dp_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret);
Nit: could add a short comment, that a long HPD interrupt that doesn't result in a connector state change could be just a transient state, so we retry the detection.
Quoted 24 lines
drivers/gpu/drm/i915/display/intel_dp.c +3
-0+if (state ==INTEL_HOTPLUG_NOCHANGE && irq_received) + state =INTEL_HOTPLUG_RETRY ; +return state; }drivers/gpu/drm/i915/display/intel_hdmi.c +10
-0@@ -3143,6 +3143,32 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,DRM_DEBUG_KMS ("CEC notifier get failed\n" ); } +static enum intel_hotplug_state +intel_hdmi_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector,bool irq_received) +{ +enum intel_hotplug_state state; + + state =intel_encoder_hotplug (encoder, connector, irq_received); + +/* +* On many platforms the HDMI live state signal is known to be
drivers/gpu/drm/i915/display/intel_hdmi.c void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, · line 3165
Quoted 10 lines
drivers/gpu/drm/i915/display/intel_hdmi.c +10
-0+* unreliable, so we can't use it to detect if a sink is connected or +* not. Instead we detect if it's connected based on whether we can +* read the EDID or not. That in turn has a problem during disconnect, +* since the HPD interrupt may be raised before the DDC lines get +* disconnected (due to how the required length of DDC vs. HPD +* connector pins are specified) and so we'll still be able to get a +* valid EDID. To solve this schedule another detection cycle if this +* time around we didn't detect any change in the sink's connection +* status. +*/
This is the same description of the issue that DDI encoders have, so could be just replaced with a reference to the intel_ddi_hotplug() func.
Looks ok:
Quoted 21 lines
drivers/gpu/drm/i915/display/intel_hdmi.c +7
-1+if (state ==INTEL_HOTPLUG_NOCHANGE && irq_received) + state =INTEL_HOTPLUG_RETRY ; + +return state; +} +void intel_hdmi_init (struct drm_i915_private *dev_priv,i915_reg_t hdmi_reg,enum port port) {@@ -3166,7 +3192,7 @@ void intel_hdmi_init(struct drm_i915_private *dev_priv, &intel_hdmi_enc_funcs,DRM_MODE_ENCODER_TMDS , "HDMI %c", port_name(port)); - intel_encoder->hotplug = intel_encoder_hotplug; + intel_encoder->hotplug = intel_hdmi_hotplug; intel_encoder->compute_config = intel_hdmi_compute_config;if (HAS_PCH_SPLIT (dev_priv)) { intel_encoder->disable = pch_disable_hdmi;Signature · 1 line
2.22.0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [v3,1/2] drm/i915: Add support for retrying hotplug
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [v3,1/2] drm/i915: Add support for retrying hotplug
URL : https://patchwork.freedesktop.org/series/62965/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6384 -> Patchwork_13471
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/
Known issues
------------
Here are the changes found in Patchwork_13471 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_basic@create-fd-close:
- fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/fi-icl-u3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/fi-icl-u3/igt@[email protected]
* igt@gem_ctx_create@basic-files:
- fi-icl-u3: [PASS][3] -> [INCOMPLETE][4] ([fdo#107713] / [fdo#109100])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/fi-icl-u3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/fi-icl-u3/igt@[email protected]
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-kbl-r: [PASS][5] -> [DMESG-WARN][6] ([fdo#111012])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/fi-kbl-r/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/fi-kbl-r/igt@[email protected]
* igt@i915_selftest@live_blt:
- fi-skl-iommu: [PASS][7] -> [INCOMPLETE][8] ([fdo#108602])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/fi-skl-iommu/igt@i915_selftest@live_blt.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/fi-skl-iommu/igt@i915_selftest@live_blt.html
#### Possible fixes ####
* igt@kms_frontbuffer_tracking@basic:
- fi-icl-dsi: [DMESG-WARN][9] ([fdo#106107]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/fi-icl-dsi/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/fi-icl-dsi/igt@[email protected]
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602
[fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
[fdo#111012]: https://bugs.freedesktop.org/show_bug.cgi?id=111012
Participating hosts (52 -> 43)
------------------------------
Additional (1): fi-hsw-4770r
Missing (10): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks fi-bsw-cyan fi-gdg-551 fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_6384 -> Patchwork_13471
CI_DRM_6384: 69d66a9ddf47e9d5c250e7011a3b97ad0608512d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5075: 03779dd3de8a57544f124d9952a6d2b3e34e34ca @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13471: 19453312d8cf7e750eb763735e0715ad9f145c6b @ git://anongit.freedesktop.org/gfx-ci/linux
== Kernel 32bit build ==
Warning: Kernel 32bit buildtest failed:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/build_32bit.log
CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh CHK include/generated/compile.h
Kernel: arch/x86/boot/bzImage is ready (#1)
Building modules, stage 2.
MODPOST 112 modules
ERROR: "__udivdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!
ERROR: "__divdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1
Makefile:1287: recipe for target 'modules' failed
make: *** [modules] Error 2
== Linux commits ==
19453312d8cf drm/i915: Enable hotplug retry 6668a33333af drm/i915: Add support for retrying hotplug
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [v3,1/2] drm/i915: Add support for retrying hotplug
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [v3,1/2] drm/i915: Add support for retrying hotplug
URL : https://patchwork.freedesktop.org/series/62965/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6384_full -> Patchwork_13471_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_13471_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@mock_requests:
- shard-skl: [PASS][1] -> [INCOMPLETE][2] ([fdo#110550])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-skl3/igt@i915_selftest@mock_requests.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-skl1/igt@i915_selftest@mock_requests.html
* igt@kms_color@pipe-b-ctm-negative:
- shard-skl: [PASS][3] -> [FAIL][4] ([fdo#107361])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-skl5/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-skl3/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-atomic:
- shard-skl: [PASS][5] -> [FAIL][6] ([fdo#102670])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-skl10/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-skl8/igt@[email protected]
* igt@kms_flip@2x-blocking-absolute-wf_vblank:
- shard-hsw: [PASS][7] -> [SKIP][8] ([fdo#109271])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-hsw2/igt@kms_flip@2x-blocking-absolute-wf_vblank.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-hsw1/igt@kms_flip@2x-blocking-absolute-wf_vblank.html
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-iclb: [PASS][9] -> [INCOMPLETE][10] ([fdo#107713] / [fdo#109507])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-iclb6/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-iclb3/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: [PASS][11] -> [FAIL][12] ([fdo#103167]) +5 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl: [PASS][13] -> [DMESG-WARN][14] ([fdo#108566]) +5 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-apl7/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-apl7/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
- shard-skl: [PASS][15] -> [FAIL][16] ([fdo#108145]) +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-skl3/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-skl1/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][17] -> [FAIL][18] ([fdo#108145] / [fdo#110403]) +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-skl1/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-skl1/igt@[email protected]
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [PASS][19] -> [SKIP][20] ([fdo#109441])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-iclb5/igt@kms_psr@psr2_cursor_render.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: [PASS][21] -> [DMESG-WARN][22] ([fdo#108566]) +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-kbl7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-kbl1/igt@[email protected]
* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-iclb: [PASS][23] -> [INCOMPLETE][24] ([fdo#107713])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-iclb4/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-iclb3/igt@[email protected]
* igt@perf@blocking:
- shard-skl: [PASS][25] -> [FAIL][26] ([fdo#110728]) +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-skl5/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-skl4/igt@[email protected]
#### Possible fixes ####
* igt@gem_ctx_isolation@bcs0-s3:
- shard-apl: [DMESG-WARN][27] ([fdo#108566]) -> [PASS][28] +3 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-apl1/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-apl5/igt@[email protected]
- shard-kbl: [DMESG-WARN][29] ([fdo#108566]) -> [PASS][30] +2 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-kbl6/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-kbl7/igt@[email protected]
* igt@gem_eio@reset-stress:
- shard-skl: [FAIL][31] ([fdo#109661]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-skl7/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-skl10/igt@[email protected]
* igt@i915_pm_backlight@fade_with_suspend:
- shard-skl: [INCOMPLETE][33] ([fdo#104108]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-skl3/igt@i915_pm_backlight@fade_with_suspend.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-skl9/igt@i915_pm_backlight@fade_with_suspend.html
* igt@i915_pm_rpm@debugfs-forcewake-user:
- shard-iclb: [INCOMPLETE][35] ([fdo#107713] / [fdo#108840]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-iclb2/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-iclb2/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
- shard-iclb: [FAIL][37] ([fdo#103167]) -> [PASS][38] +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-iclb4/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-iclb1/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-render:
- shard-hsw: [SKIP][39] ([fdo#109271]) -> [PASS][40] +24 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-hsw1/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-render.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-hsw1/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-render.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [INCOMPLETE][41] ([fdo#103665]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-kbl3/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-kbl2/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][43] ([fdo#108145]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-skl4/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-skl5/igt@[email protected]
* igt@kms_plane_lowres@pipe-a-tiling-y:
- shard-iclb: [FAIL][45] ([fdo#103166]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-iclb8/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-iclb6/igt@[email protected]
* igt@kms_sequence@get-busy:
- shard-iclb: [INCOMPLETE][47] ([fdo#107713]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-iclb7/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-iclb7/igt@[email protected]
* igt@kms_setmode@basic:
- shard-apl: [FAIL][49] ([fdo#99912]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-apl2/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-apl5/igt@[email protected]
- shard-kbl: [FAIL][51] ([fdo#99912]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-kbl7/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-kbl6/igt@[email protected]
* igt@kms_sysfs_edid_timing:
- shard-hsw: [FAIL][53] ([fdo#100047]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-hsw1/igt@kms_sysfs_edid_timing.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-hsw5/igt@kms_sysfs_edid_timing.html
* igt@perf_pmu@rc6:
- shard-kbl: [SKIP][55] ([fdo#109271]) -> [PASS][56] +1 similar issue
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-kbl7/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-kbl1/igt@[email protected]
#### Warnings ####
* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [SKIP][57] ([fdo#109349]) -> [DMESG-WARN][58] ([fdo#107724])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6384/shard-iclb8/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/shard-iclb2/igt@[email protected]
[fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
[fdo#102670]: https://bugs.freedesktop.org/show_bug.cgi?id=102670
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#107361]: https://bugs.freedesktop.org/show_bug.cgi?id=107361
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110550]: https://bugs.freedesktop.org/show_bug.cgi?id=110550
[fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_6384 -> Patchwork_13471
CI_DRM_6384: 69d66a9ddf47e9d5c250e7011a3b97ad0608512d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5075: 03779dd3de8a57544f124d9952a6d2b3e34e34ca @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13471: 19453312d8cf7e750eb763735e0715ad9f145c6b @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13471/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 333 lines · José Roberto de Souza
From: Imre Deak <[email protected]>
There is some scenarios that we are aware that sink probe can fail, so lets add the infrastructure to let
hotplug()hook to request another probe after some time.v2: Handle shared HPD pins (Imre)
v3: RebasedCc Ville Syrjälä <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>Signed-off-by Jani Nikula <[email protected]>Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_ddi.c | 12 ++-- drivers/gpu/drm/i915/display/intel_dp.c | 12 ++-- drivers/gpu/drm/i915/display/intel_hotplug.c | 59 +++++++++++++++----- drivers/gpu/drm/i915/display/intel_hotplug.h | 5 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 8 ++- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/intel_drv.h | 11 +++- 8 files changed, 80 insertions(+), 32 deletions(-)drivers/gpu/drm/i915/display/intel_ddi.c +7
-5@@ -4081,14 +4081,16 @@ static int intel_hdmi_reset_link(struct intel_encoder *encoder,return modeset_pipe (&crtc->base, ctx); } -static bool intel_ddi_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector) +static enum intel_hotplug_state +intel_ddi_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received) {struct drm_modeset_acquire_ctx ctx; -bool changed; +enum intel_hotplug_state state;int ret; - changed =intel_encoder_hotplug (encoder, connector); + state =intel_encoder_hotplug (encoder, connector, irq_received);drm_modeset_acquire_init (&ctx,0 );@@ -4110,7 +4112,7 @@ static bool intel_ddi_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret); -return changed; +return state; } static struct intel_connector *drivers/gpu/drm/i915/display/intel_dp.c +7
-5@@ -4878,14 +4878,16 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,* retrain the link to get a picture. That's in case no * userspace component reacted to intermittent HPD dip. */ -static bool intel_dp_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector) +static enum intel_hotplug_state +intel_dp_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received) {struct drm_modeset_acquire_ctx ctx; -bool changed; +enum intel_hotplug_state state;int ret; - changed =intel_encoder_hotplug (encoder, connector); + state =intel_encoder_hotplug (encoder, connector, irq_received);drm_modeset_acquire_init (&ctx,0 );@@ -4904,7 +4906,7 @@ static bool intel_dp_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret); -return changed; +return state; }static void intel_dp_check_service_irq (struct intel_dp *intel_dp)drivers/gpu/drm/i915/display/intel_hotplug.c +46
-13@@ -112,6 +112,7 @@ enum hpd_pin intel_hpd_pin_default(struct drm_i915_private *dev_priv,#define HPD_STORM_DETECT_PERIOD 1000#define HPD_STORM_REENABLE_DELAY (2 * 60 * 1000) +#define HPD_RETRY_DELAY 1000/** * intel_hpd_irq_storm_detect - gather stats and detect HPD IRQ storm on a pin @@ -266,8 +267,10 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)intel_runtime_pm_put (&dev_priv->runtime_pm, wakeref); } -bool intel_encoder_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector) +enum intel_hotplug_state +intel_encoder_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received) {struct drm_device *dev = connector->base.dev;enum drm_connector_status old_status;@@ -279,7 +282,7 @@ bool intel_encoder_hotplug(struct intel_encoder *encoder,drm_helper_probe_detect (&connector->base,NULL , false);if (old_status == connector->base.status) -return false; +return INTEL_HOTPLUG_NOCHANGE ; DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n", connector->base.base.id,@@ -287,7 +290,7 @@ bool intel_encoder_hotplug(struct intel_encoder *encoder,drm_get_connector_status_name (old_status), drm_get_connector_status_name(connector->base.status)); -return true; +return INTEL_HOTPLUG_CHANGED ; }static bool intel_encoder_has_hpd_pulse (struct intel_encoder *encoder)@@ -339,7 +342,7 @@ static void i915_digport_work_func(struct work_struct *work)spin_lock_irq (&dev_priv->irq_lock); dev_priv->hotplug.event_bits |= old_bits;spin_unlock_irq (&dev_priv->irq_lock); -schedule_work (&dev_priv->hotplug.hotplug_work); +schedule_delayed_work (&dev_priv->hotplug.hotplug_work,0 ); } }@@ -349,14 +352,16 @@ static void i915_digport_work_func(struct work_struct *work)static void i915_hotplug_work_func (struct work_struct *work) {struct drm_i915_private *dev_priv = - container_of(work, struct drm_i915_private, hotplug.hotplug_work); + container_of(work, struct drm_i915_private, + hotplug.hotplug_work.work);struct drm_device *dev = &dev_priv->drm;struct intel_connector *intel_connector;struct intel_encoder *intel_encoder;struct drm_connector *connector;struct drm_connector_list_iter conn_iter; -bool changed = false; +u32 changed =0 , retry =0 ;u32 hpd_event_bits; +u32 hpd_retry_bits;mutex_lock (&dev->mode_config.mutex);DRM_DEBUG_KMS ("running encoder hotplug functions\n" );@@ -365,6 +370,8 @@ static void i915_hotplug_work_func(struct work_struct *work) hpd_event_bits = dev_priv->hotplug.event_bits; dev_priv->hotplug.event_bits =0 ; + hpd_retry_bits = dev_priv->hotplug.retry_bits; + dev_priv->hotplug.retry_bits =0 ;/* Enable polling for connectors which had HPD IRQ storms */ intel_hpd_irq_storm_switch_to_polling (dev_priv);@@ -373,16 +380,29 @@ static void i915_hotplug_work_func(struct work_struct *work)drm_connector_list_iter_begin (dev, &conn_iter);drm_for_each_connector_iter (connector, &conn_iter) { +u32 hpd_bit; + intel_connector =to_intel_connector (connector);if (!intel_connector->encoder)continue ; intel_encoder = intel_connector->encoder; -if (hpd_event_bits & (1 << intel_encoder->hpd_pin)) { + hpd_bit =BIT (intel_encoder->hpd_pin); +if ((hpd_event_bits | hpd_retry_bits) & hpd_bit) {DRM_DEBUG_KMS ("Connector %s (pin %i) received hotplug event.\n" , connector->name, intel_encoder->hpd_pin); - changed |= intel_encoder->hotplug (intel_encoder, - intel_connector); +switch (intel_encoder->hotplug (intel_encoder, + intel_connector, + hpd_event_bits & hpd_bit)) { +case INTEL_HOTPLUG_NOCHANGE : +break ; +case INTEL_HOTPLUG_CHANGED : + changed |= hpd_bit; +break ; +case INTEL_HOTPLUG_RETRY : + retry |= hpd_bit; +break ; + } } }drm_connector_list_iter_end (&conn_iter);@@ -390,6 +410,17 @@ static void i915_hotplug_work_func(struct work_struct *work)if (changed)drm_kms_helper_hotplug_event (dev); + +/* Remove shared HPD pins that have changed */ + retry &= ~changed; +if (retry) { +spin_lock_irq (&dev_priv->irq_lock); + dev_priv->hotplug.retry_bits |= retry; +spin_unlock_irq (&dev_priv->irq_lock); + +mod_delayed_work (system_wq, &dev_priv->hotplug.hotplug_work, +msecs_to_jiffies (HPD_RETRY_DELAY )); + } }@@ -516,7 +547,7 @@ void intel_hpd_irq_handler(struct drm_i915_private *dev_priv,if (queue_dig)queue_work (dev_priv->hotplug.dp_wq, &dev_priv->hotplug.dig_port_work);if (queue_hp) -schedule_work (&dev_priv->hotplug.hotplug_work); +schedule_delayed_work (&dev_priv->hotplug.hotplug_work,0 ); }/** @@ -636,7 +667,8 @@ void intel_hpd_poll_init(struct drm_i915_private *dev_priv)void intel_hpd_init_work (struct drm_i915_private *dev_priv) { -INIT_WORK (&dev_priv->hotplug.hotplug_work, i915_hotplug_work_func); +INIT_DELAYED_WORK (&dev_priv->hotplug.hotplug_work, + i915_hotplug_work_func);INIT_WORK (&dev_priv->hotplug.dig_port_work, i915_digport_work_func);INIT_WORK (&dev_priv->hotplug.poll_init_work, i915_hpd_poll_init_work); INIT_DELAYED_WORK(&dev_priv->hotplug.reenable_work,@@ -650,11 +682,12 @@ void intel_hpd_cancel_work(struct drm_i915_private *dev_priv) dev_priv->hotplug.long_port_mask =0 ; dev_priv->hotplug.short_port_mask =0 ; dev_priv->hotplug.event_bits =0 ; + dev_priv->hotplug.retry_bits =0 ;spin_unlock_irq (&dev_priv->irq_lock);cancel_work_sync (&dev_priv->hotplug.dig_port_work); -cancel_work_sync (&dev_priv->hotplug.hotplug_work); +cancel_delayed_work_sync (&dev_priv->hotplug.hotplug_work);cancel_work_sync (&dev_priv->hotplug.poll_init_work);cancel_delayed_work_sync (&dev_priv->hotplug.reenable_work); }drivers/gpu/drm/i915/display/intel_hotplug.h +3
-2@@ -15,8 +15,9 @@ struct intel_connector;struct intel_encoder ;void intel_hpd_poll_init (struct drm_i915_private *dev_priv); -bool intel_encoder_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector); +enum intel_hotplug_state intel_encoder_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received);void intel_hpd_irq_handler (struct drm_i915_private *dev_priv,u32 pin_mask,u32 long_mask);void intel_hpd_init (struct drm_i915_private *dev_priv);drivers/gpu/drm/i915/display/intel_sdvo.c +5
-3@@ -1893,12 +1893,14 @@ static void intel_sdvo_enable_hotplug(struct intel_encoder *encoder) &intel_sdvo->hotplug_active, 2); } -static bool intel_sdvo_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector) +static enum intel_hotplug_state +intel_sdvo_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received) {intel_sdvo_enable_hotplug (encoder); -return intel_encoder_hotplug (encoder, connector); +return intel_encoder_hotplug (encoder, connector, irq_received); } static booldrivers/gpu/drm/i915/i915_debugfs.c +1
-1@@ -4083,7 +4083,7 @@ static int i915_hpd_storm_ctl_show(struct seq_file *m, void *data)*/ synchronize_irq (dev_priv->drm.irq);flush_work (&dev_priv->hotplug.dig_port_work); -flush_work (&dev_priv->hotplug.hotplug_work); +flush_delayed_work (&dev_priv->hotplug.hotplug_work);seq_printf (m,"Threshold: %d\n" , hotplug->hpd_storm_threshold); seq_printf(m, "Detected: %s\n",drivers/gpu/drm/i915/i915_drv.h +2
-1@@ -163,7 +163,7 @@ enum hpd_pin {#define HPD_STORM_DEFAULT_THRESHOLD 50struct i915_hotplug { -struct work_struct hotplug_work; +struct delayed_work hotplug_work;struct {unsigned long last_jiffies;@@ -175,6 +175,7 @@ struct i915_hotplug { } state; } stats[HPD_NUM_PINS ];u32 event_bits; +u32 retry_bits;struct delayed_work reenable_work;u32 long_port_mask;drivers/gpu/drm/i915/intel_drv.h +0
-0
drivers/gpu/drm/i915/intel_drv.h struct intel_fbdev { · line 106
Quoted 6 lines
drivers/gpu/drm/i915/intel_drv.h +3
-0@@ -101,14 +101,21 @@ struct intel_fbdev {struct mutex hpd_lock; }; +enum intel_hotplug_state { +INTEL_HOTPLUG_NOCHANGE , +INTEL_HOTPLUG_CHANGED ,
my only bikeshed would be to keep this symmetric... no-change change or preferably unchanged changed.
But everything seems right so let's move
Quoted 24 lines
drivers/gpu/drm/i915/intel_drv.h +6
-2+ INTEL_HOTPLUG_RETRY, +}; +struct intel_encoder {struct drm_encoder base;enum intel_output_type type;enum port port;unsigned int cloneable; -bool (*hotplug)(struct intel_encoder *encoder, -struct intel_connector *connector); +enum intel_hotplug_state (*hotplug)(struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received);enum intel_output_type (*compute_output_type)(struct intel_encoder *,struct intel_crtc_state *,struct drm_connector_state *);Signature · 6 lines
2.22.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 386 lines · Rodrigo Vivi
Quoted 384 lines · José Roberto de Souza
From: Imre Deak <[email protected]>
There is some scenarios that we are aware that sink probe can fail, so lets add the infrastructure to let
hotplug()hook to request another probe after some time.v2: Handle shared HPD pins (Imre)
v3: RebasedCc Ville Syrjälä <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>Signed-off-by Jani Nikula <[email protected]>Signed-off-by Imre Deak <[email protected]>--- drivers/gpu/drm/i915/display/intel_ddi.c | 12 ++-- drivers/gpu/drm/i915/display/intel_dp.c | 12 ++-- drivers/gpu/drm/i915/display/intel_hotplug.c | 59 +++++++++++++++- ---- drivers/gpu/drm/i915/display/intel_hotplug.h | 5 +- drivers/gpu/drm/i915/display/intel_sdvo.c | 8 ++- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 3 +- drivers/gpu/drm/i915/intel_drv.h | 11 +++- 8 files changed, 80 insertions(+), 32 deletions(-)drivers/gpu/drm/i915/display/intel_ddi.c +6
-4@@ -4081,14 +4081,16 @@ static int intel_hdmi_reset_link(structintel_encoder *encoder, return modeset_pipe(&crtc->base, ctx); } -static bool intel_ddi_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector) +static enum intel_hotplug_state +intel_ddi_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received) {struct drm_modeset_acquire_ctx ctx; -bool changed; +enum intel_hotplug_state state;int ret; - changed =intel_encoder_hotplug (encoder, connector); + state =intel_encoder_hotplug (encoder, connector, irq_received);drivers/gpu/drm/i915/display/intel_ddi.c +1
-1drm_modeset_acquire_init (&ctx,0 );@@ -4110,7 +4112,7 @@ static bool intel_ddi_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret); -return changed; +return state; }static struct
intel_connector*drivers/gpu/drm/i915/display/intel_dp.c +6
-4@@ -4878,14 +4878,16 @@ int intel_dp_retrain_link(structintel_encoder *encoder, * retrain the link to get a picture. That's in case no * userspace component reacted to intermittent HPD dip. */ -static bool intel_dp_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector) +static enum intel_hotplug_state +intel_dp_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received) {struct drm_modeset_acquire_ctx ctx; -bool changed; +enum intel_hotplug_state state;int ret; - changed =intel_encoder_hotplug (encoder, connector); + state =intel_encoder_hotplug (encoder, connector, irq_received);drivers/gpu/drm/i915/display/intel_dp.c +1
-1drm_modeset_acquire_init (&ctx,0 );@@ -4904,7 +4906,7 @@ static bool intel_dp_hotplug(struct intel_encoder *encoder,drm_modeset_acquire_fini (&ctx);WARN (ret,"Acquiring modeset locks failed with %i\n" , ret); -return changed; +return state; }static void
intel_dp_check_service_irq(struct intel_dp *intel_dp)drivers/gpu/drm/i915/display/intel_hotplug.c +1
-0@@ -112,6 +112,7 @@ enum hpd_pin intel_hpd_pin_default(struct drm_i915_private *dev_priv,#define HPD_STORM_DETECT_PERIOD 1000#define HPD_STORM_REENABLE_DELAY (2 * 60 * 1000) +#define HPD_RETRY_DELAY 1000/** *
intel_hpd_irq_storm_detect- gather stats and detect HPD IRQ
storm on a pindrivers/gpu/drm/i915/display/intel_hotplug.c +4
-2@@ -266,8 +267,10 @@ static void intel_hpd_irq_storm_reenable_work(struct work_struct *work) intel_runtime_pm_put(&dev_priv->runtime_pm, wakeref); } -bool intel_encoder_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector) +enum intel_hotplug_state +intel_encoder_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received) {struct drm_device *dev = connector->base.dev;drivers/gpu/drm/i915/display/intel_hotplug.c +1
-1enum drm_connector_status old_status;@@ -279,7 +282,7 @@ bool intel_encoder_hotplug(struct intel_encoder *encoder,drm_helper_probe_detect (&connector->base,NULL , false);if (old_status == connector->base.status) -return false; +return INTEL_HOTPLUG_NOCHANGE ; DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to%s\n",
drivers/gpu/drm/i915/display/intel_hotplug.c +1
-1connector->base.base.id,@@ -287,7 +290,7 @@ bool intel_encoder_hotplug(struct intel_encoder *encoder,drm_get_connector_status_name (old_status),drm_get_connector_status_name (connector- >base.status)); -return true; +return INTEL_HOTPLUG_CHANGED ; }static bool intel_encoder_has_hpd_pulse(struct
intel_encoder
*encoder)drivers/gpu/drm/i915/display/intel_hotplug.c +1
-1@@ -339,7 +342,7 @@ static void i915_digport_work_func(struct work_struct *work) spin_lock_irq(&dev_priv->irq_lock); dev_priv->hotplug.event_bits |= old_bits;spin_unlock_irq (&dev_priv->irq_lock); -schedule_work (&dev_priv->hotplug.hotplug_work); +schedule_delayed_work (&dev_priv->hotplug.hotplug_work,0 ); }}
drivers/gpu/drm/i915/display/intel_hotplug.c +4
-2@@ -349,14 +352,16 @@ static void i915_digport_work_func(struct work_struct *work)static void i915_hotplug_work_func (struct work_struct *work) {struct drm_i915_private *dev_priv = - container_of(work, struct drm_i915_private, hotplug.hotplug_work); + container_of(work, struct drm_i915_private, + hotplug.hotplug_work.work);struct drm_device *dev = &dev_priv->drm;struct intel_connector *intel_connector;struct intel_encoder *intel_encoder;struct drm_connector *connector;struct drm_connector_list_iter conn_iter; -bool changed = false; +u32 changed =0 , retry =0 ;u32 hpd_event_bits; +u32 hpd_retry_bits;drivers/gpu/drm/i915/display/intel_hotplug.c +2
-0mutex_lock (&dev->mode_config.mutex);DRM_DEBUG_KMS ("running encoder hotplug functions\n" );@@ -365,6 +370,8 @@ static void i915_hotplug_work_func(struct work_struct *work) hpd_event_bits = dev_priv->hotplug.event_bits; dev_priv->hotplug.event_bits =0 ; + hpd_retry_bits = dev_priv->hotplug.retry_bits; + dev_priv->hotplug.retry_bits =0 ;/* Enable polling for connectors which had HPD IRQ storms */ drivers/gpu/drm/i915/display/intel_hotplug.c +4
-3intel_hpd_irq_storm_switch_to_polling (dev_priv);@@ -373,16 +380,29 @@ static void i915_hotplug_work_func(struct work_struct *work) drm_connector_list_iter_begin(dev, &conn_iter); drm_for_each_connector_iter(connector, &conn_iter) { +u32 hpd_bit; + intel_connector =to_intel_connector (connector);if (!intel_connector->encoder)continue ; intel_encoder = intel_connector->encoder; -if (hpd_event_bits & (1 << intel_encoder->hpd_pin)) { + hpd_bit =BIT (intel_encoder->hpd_pin); +if ((hpd_event_bits | hpd_retry_bits) & hpd_bit) { DRM_DEBUG_KMS("Connector %s (pin %i) received hotplug event.\n", connector->name, intel_encoder- >hpd_pin); - changed |= intel_encoder- >hotplug(intel_encoder, - intel_connector);
drivers/gpu/drm/i915/display/intel_hotplug.c +3
-0+ switch (intel_encoder->hotplug(intel_encoder, + intel_connector, + hpd_event_bits &
hpd_bit)) {drivers/gpu/drm/i915/display/intel_hotplug.c +21
-1+case INTEL_HOTPLUG_NOCHANGE : +break ; +case INTEL_HOTPLUG_CHANGED : + changed |= hpd_bit; +break ; +case INTEL_HOTPLUG_RETRY : + retry |= hpd_bit; +break ; + } } }drm_connector_list_iter_end (&conn_iter);@@ -390,6 +410,17 @@ static void i915_hotplug_work_func(struct work_struct *work)if (changed)drm_kms_helper_hotplug_event (dev); + +/* Remove shared HPD pins that have changed */ + retry &= ~changed; +if (retry) { +spin_lock_irq (&dev_priv->irq_lock); + dev_priv->hotplug.retry_bits |= retry; +spin_unlock_irq (&dev_priv->irq_lock); + +mod_delayed_work (system_wq, &dev_priv- >hotplug.hotplug_work, +msecs_to_jiffies (HPD_RETRY_DELAY )); + } }@@ -516,7 +547,7 @@ void intel_hpd_irq_handler(struct drm_i915_private *dev_priv, if (queue_dig) queue_work(dev_priv->hotplug.dp_wq, &dev_priv- >hotplug.dig_port_work);if (queue_hp) -schedule_work (&dev_priv->hotplug.hotplug_work); +schedule_delayed_work (&dev_priv->hotplug.hotplug_work,0 );}
/**
drivers/gpu/drm/i915/display/intel_hotplug.c +2
-1@@ -636,7 +667,8 @@ void intel_hpd_poll_init(struct drm_i915_private *dev_priv)void intel_hpd_init_work (struct drm_i915_private *dev_priv) { -INIT_WORK (&dev_priv->hotplug.hotplug_work, i915_hotplug_work_func); +INIT_DELAYED_WORK (&dev_priv->hotplug.hotplug_work, + i915_hotplug_work_func); INIT_WORK(&dev_priv->hotplug.dig_port_work,
i915_digport_work_func);
INIT_WORK(&dev_priv->hotplug.poll_init_work,i915_hpd_poll_init_work);drivers/gpu/drm/i915/display/intel_hotplug.c +2
-1INIT_DELAYED_WORK(&dev_priv->hotplug.reenable_work,@@ -650,11 +682,12 @@ void intel_hpd_cancel_work(struct drm_i915_private *dev_priv) dev_priv->hotplug.long_port_mask = 0; dev_priv->hotplug.short_port_mask =0 ; dev_priv->hotplug.event_bits =0 ; + dev_priv->hotplug.retry_bits =0 ;spin_unlock_irq (&dev_priv->irq_lock);cancel_work_sync (&dev_priv->hotplug.dig_port_work); -cancel_work_sync (&dev_priv->hotplug.hotplug_work); +cancel_delayed_work_sync (&dev_priv->hotplug.hotplug_work);cancel_work_sync (&dev_priv->hotplug.poll_init_work);cancel_delayed_work_sync (&dev_priv->hotplug.reenable_work);}
drivers/gpu/drm/i915/display/intel_hotplug.h +3
-2@@ -15,8 +15,9 @@ struct intel_connector;struct intel_encoder ;void intel_hpd_poll_init (struct drm_i915_private *dev_priv); -bool intel_encoder_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector); +enum intel_hotplug_state intel_encoder_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received); void intel_hpd_irq_handler(struct drm_i915_private *dev_priv,drivers/gpu/drm/i915/display/intel_hotplug.h +0
-0u32 pin_mask, u32 long_mask);void intel_hpd_init (struct drm_i915_private *dev_priv);drivers/gpu/drm/i915/display/intel_sdvo.c +5
-3@@ -1893,12 +1893,14 @@ static void intel_sdvo_enable_hotplug(struct intel_encoder *encoder) &intel_sdvo->hotplug_active, 2); } -static bool intel_sdvo_hotplug (struct intel_encoder *encoder, -struct intel_connector *connector) +static enum intel_hotplug_state +intel_sdvo_hotplug (struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received) {intel_sdvo_enable_hotplug (encoder); -return intel_encoder_hotplug (encoder, connector); +return intel_encoder_hotplug (encoder, connector, irq_received); }static bool
drivers/gpu/drm/i915/i915_debugfs.c +1
-1@@ -4083,7 +4083,7 @@ static int i915_hpd_storm_ctl_show(structseq_file *m, void *data) */ synchronize_irq (dev_priv->drm.irq);flush_work (&dev_priv->hotplug.dig_port_work); -flush_work (&dev_priv->hotplug.hotplug_work); +flush_delayed_work (&dev_priv->hotplug.hotplug_work);seq_printf (m,"Threshold: %d\n" , hotplug->hpd_storm_threshold);drivers/gpu/drm/i915/i915_debugfs.c +0
-0seq_printf(m, "Detected: %s\n",drivers/gpu/drm/i915/i915_drv.h +2
-1@@ -163,7 +163,7 @@ enum hpd_pin {#define HPD_STORM_DEFAULT_THRESHOLD 50struct i915_hotplug { -struct work_struct hotplug_work; +struct delayed_work hotplug_work;struct {unsigned long last_jiffies;@@ -175,6 +175,7 @@ struct i915_hotplug { } state; } stats[HPD_NUM_PINS ];u32 event_bits; +u32 retry_bits;struct delayed_work reenable_work;u32 long_port_mask;drivers/gpu/drm/i915/intel_drv.h +0
-0@@ -101,14 +101,21 @@ struct intel_fbdev {struct mutex hpd_lock; };
Quoted 8 lines
drivers/gpu/drm/i915/intel_drv.h struct intel_fbdev { · line 106
Quoted 3 lines
drivers/gpu/drm/i915/intel_drv.h +3
-0+enum intel_hotplug_state { +INTEL_HOTPLUG_NOCHANGE , +INTEL_HOTPLUG_CHANGED ,my only bikeshed would be to keep this symmetric... no-change change or preferably unchanged changed.
But everything seems right so let's move
Just sent a new version replacing nochange to unchanged and added your r-v-b.
Thanks
Quoted 28 lines
Reviewed-by Rodrigo Vivi <[email protected]>Quoted 25 lines
drivers/gpu/drm/i915/intel_drv.h +6
-2+ INTEL_HOTPLUG_RETRY, +}; +struct intel_encoder {struct drm_encoder base;enum intel_output_type type;enum port port;unsigned int cloneable; -bool (*hotplug)(struct intel_encoder *encoder, - struct intel_connector *connector); +enum intel_hotplug_state (*hotplug)(struct intel_encoder *encoder, +struct intel_connector *connector, +bool irq_received); enum intel_output_type (*compute_output_type)(struct
intel_encoder*,
structintel_crtc_state*,
structdrm_connector_state*);Signature · 1 line
2.22.0
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx