<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 13, 2018 at 1:18 PM Guang Bai <<a href="mailto:guang.bai@intel.com">guang.bai@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 13 Nov 2018 09:04:37 +0800<br>
Chris Chiu <<a href="mailto:chiu@endlessm.com" target="_blank">chiu@endlessm.com</a>> wrote:<br>
<br>
> Gentle ping. Just want to know if you have time for this so far.<br>
> Thanks<br>
> <br>
> Chris<br>
Actually I'm still working on it right now with<br>
DRM_MODE_CONNECTOR_HDMIA/HDMIB, recommended by James, I'm able to<br>
differentiate the HDMI or DP even the encoder type is the<br>
"INTEL_OUTPUT_DDI", I still have the "trybot" intermittent test failures<br>
with new DRM connector types. Even worse, there is phantom<br>
"intel_encoder_hotplug()" call following the correct one:<br>
When connecting both DP and HDMI on the platform, unplug the DP, the<br>
"i915_hotplug_work_func()" first calls the "intel_encoder_hotplug()"<br>
with DP encoder, then calls again with HDMI encoder.<br>
I haven't identified if the work function get queued twice or itself<br>
is incorrectly identifying wrong encoder hotplut status. Will try to<br>
get everything cleaned up ASAP.<br>
Thanks,<br>
Guang<br>
> <br>
></blockquote><div> </div><div>Anything I can help? Maybe test in a more complicated use case? I have lots</div><div>of different laptops/AIOs/Desktops if you need.</div><div><br></div><div>Chris</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Oct 30, 2018 at 1:24 AM Guang Bai <<a href="mailto:guang.bai@intel.com" target="_blank">guang.bai@intel.com</a>> wrote:<br>
> <br>
> > On Tue, 23 Oct 2018 17:14:34 +0800<br>
> > Chris Chiu <<a href="mailto:chiu@endlessm.com" target="_blank">chiu@endlessm.com</a>> wrote:<br>
> > <br>
> > > On Thu, Oct 11, 2018 at 2:04 AM Guang Bai <<a href="mailto:guang.bai@intel.com" target="_blank">guang.bai@intel.com</a>><br>
> > > wrote: <br>
> > > > On Mon, 8 Oct 2018 08:56:20 -0700<br>
> > > > Guang Bai <<a href="mailto:guang.bai@intel.com" target="_blank">guang.bai@intel.com</a>> wrote:<br>
> > > > <br>
> > > > > On Mon, 8 Oct 2018 22:35:34 +0800<br>
> > > > > Chris Chiu <<a href="mailto:chiu@endlessm.com" target="_blank">chiu@endlessm.com</a>> wrote:<br>
> > > > > <br>
> > > > > > Thanks! I have no problem with this patch. <br>
> > > > ><br>
> > > > > There are Fi.CI.BAT failures with the v2 (only with<br>
> > > > > formatting fix added) while the previous patch had passing<br>
> > > > > results. Now trying to identify why the failures happened<br>
> > > > > with trybot Thanks,<br>
> > > > > Guang <br>
> > > > The tribot run my patch twice and passes the tests without any<br>
> > > > error however I'm recommended to chase down root causes of<br>
> > > > Patchwork Fi.CI.BAT test errors still - WIP on that.<br>
> > > > Thanks,<br>
> > > > Guang<br>
> > > > <br>
> > ><br>
> > > Gentle ping. Any good news on this?<br>
> > ><br>
> > > Chris<br>
> > > <br>
> > Sorry...was distracted by other dev taks...will get update ASAP.<br>
> > -Guang <br>
> > > <br>
> > > > > <br>
> > > > > ><br>
> > > > > > On Thu, Oct 4, 2018 at 2:08 AM Guang Bai<br>
> > > > > > <<a href="mailto:guang.bai@intel.com" target="_blank">guang.bai@intel.com</a>> wrote: <br>
> > > > > > > On some platforms, slowly unplugging (wiggling) the HDMI<br>
> > > > > > > cable makes the kernel to believe the HDMI display still<br>
> > > > > > > connected. This is because the HDMI DDC lines are<br>
> > > > > > > disconnected sometimes later after the hot-plug interrupt<br>
> > > > > > > triggered. Use the hot plug live states to honor HDMI hot<br>
> > > > > > > plug status in addtion to access the DDC channels.<br>
> > > > > > ><br>
> > > > > > > v2: Fix the formatting issue<br>
> > > > > > ><br>
> > > > > > > Cc: Jani Nikula <<a href="mailto:jani.nikula@intel.com" target="_blank">jani.nikula@intel.com</a>><br>
> > > > > > > Cc: Chris Chiu <<a href="mailto:chiu@endlessm.com" target="_blank">chiu@endlessm.com</a>><br>
> > > > > > > Signed-off-by: Guang Bai <<a href="mailto:guang.bai@intel.com" target="_blank">guang.bai@intel.com</a>><br>
> > > > > > > ---<br>
> > > > > > > drivers/gpu/drm/i915/intel_hotplug.c | 32<br>
> > > > > > > +++++++++++++++++++++++++++++--- 1 file changed, 29<br>
> > > > > > > insertions(+), 3 deletions(-)<br>
> > > > > > ><br>
> > > > > > > diff --git a/drivers/gpu/drm/i915/intel_hotplug.c<br>
> > > > > > > b/drivers/gpu/drm/i915/intel_hotplug.c<br>
> > > > > > > index 648a13c..98ab1ab 100644<br>
> > > > > > > --- a/drivers/gpu/drm/i915/intel_hotplug.c<br>
> > > > > > > +++ b/drivers/gpu/drm/i915/intel_hotplug.c<br>
> > > > > > > @@ -246,17 +246,43 @@ static void<br>
> > > > > > > intel_hpd_irq_storm_reenable_work(struct work_struct<br>
> > > > > > > *work) intel_runtime_pm_put(dev_priv);<br>
> > > > > > > }<br>
> > > > > > ><br>
> > > > > > > +#define MAX_SHORT_PULSE_MS 100<br>
> > > > > > > +#define PORT_CHECK_LOOP_COUNT 3<br>
> > > > > > > +<br>
> > > > > > > bool intel_encoder_hotplug(struct intel_encoder *encoder,<br>
> > > > > > > struct intel_connector<br>
> > > > > > > *connector) {<br>
> > > > > > > struct drm_device *dev = connector->base.dev;<br>
> > > > > > > - enum drm_connector_status old_status;<br>
> > > > > > > + enum drm_connector_status old_status, new_status;<br>
> > > > > > > + enum hpd_pin pin = encoder->hpd_pin;<br>
> > > > > > > + struct drm_i915_private *dev_priv =<br>
> > > > > > > to_i915(encoder->base.dev);<br>
> > > > > > > + u32 count = 0;<br>
> > > > > > ><br>
> > > > > > > WARN_ON(!mutex_is_locked(&dev->mode_config.mutex));<br>
> > > > > > > old_status = connector->base.status;<br>
> > > > > > ><br>
> > > > > > > - connector->base.status =<br>
> > > > > > > - drm_helper_probe_detect(&connector->base,<br>
> > > > > > > NULL, false);<br>
> > > > > > > + /*<br>
> > > > > > > + * Set HDMI connection status based on hot-plug<br>
> > > > > > > live states and<br>
> > > > > > > + * display probe results.<br>
> > > > > > > + */<br>
> > > > > > > + if ((encoder->type == INTEL_OUTPUT_HDMI ||<br>
> > > > > > > + encoder->type == INTEL_OUTPUT_DDI) &&<br>
> > > > > > > + dev_priv->hotplug.stats[pin].state ==<br>
> > > > > > > HPD_ENABLED) {<br>
> > > > > > > + do {<br>
> > > > > > > + new_status =<br>
> > > > > > > connector_status_disconnected;<br>
> > > > > > > + msleep(MAX_SHORT_PULSE_MS);<br>
> > > > > > > +<br>
> > > > > > > + if<br>
> > > > > > > (intel_digital_port_connected(encoder))<br>
> > > > > > > + new_status =<br>
> > > > > > > drm_helper_probe_detect(&connector->base,<br>
> > > > > > > +<br>
> > > > > > > NULL, false);<br>
> > > > > > > + if (new_status ==<br>
> > > > > > > connector_status_connected)<br>
> > > > > > > + break;<br>
> > > > > > > + } while (++count <=<br>
> > > > > > > PORT_CHECK_LOOP_COUNT);<br>
> > > > > > > + connector->base.status = new_status;<br>
> > > > > > > + } else {<br>
> > > > > > > + connector->base.status =<br>
> > > > > > > +<br>
> > > > > > > drm_helper_probe_detect(&connector->base, NULL, false);<br>
> > > > > > > + }<br>
> > > > > > ><br>
> > > > > > > if (old_status == connector->base.status)<br>
> > > > > > > return false;<br>
> > > > > > > --<br>
> > > > > > > 2.7.4<br>
> > > > > > ><br>
> > > > > > > <br>
> > > > ><br>
> > > > > _______________________________________________<br>
> > > > > Intel-gfx mailing list<br>
> > > > > <a href="mailto:Intel-gfx@lists.freedesktop.org" target="_blank">Intel-gfx@lists.freedesktop.org</a><br>
> > > > > <a href="https://lists.freedesktop.org/mailman/listinfo/intel-gfx" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/intel-gfx</a> <br>
> > > ><br>
> > > > <br>
> ><br>
> > <br>
<br>
</blockquote></div></div>