Re: [PATCH v3] drm/msm/dp: enable HDP plugin/unplugged interrupts at hpd_enable/disable

From: Kuogee Hsieh
Date: Mon May 22 2023 - 18:36:09 EST




  -static void dp_display_config_hpd(struct dp_display_private *dp)
-{
-
-    dp_display_host_init(dp);
-    dp_catalog_ctrl_hpd_config(dp->catalog);
-
-    /* Enable plug and unplug interrupts only if requested */
-    if (dp->dp_display.internal_hpd)
-        dp_catalog_hpd_config_intr(dp->catalog,
-                DP_DP_HPD_PLUG_INT_MASK |
-                DP_DP_HPD_UNPLUG_INT_MASK,
-                true);
-
-    /* Enable interrupt first time
-     * we are leaving dp clocks on during disconnect
-     * and never disable interrupt
-     */
-    enable_irq(dp->irq);

...we need dp->irq enabled for handling the other interrupts, otherwise
e.g. AUX transfers will time out.

I added enable_irq(dp_priv->irq) to the EV_HPD_INIT_SETUP case below,
just for testing, and with that the patch seems to be working fine.


Is there any reason why we need to delay its enablement to after we
unmask the HPD interrupts?

my though is aux transaction should happen after plugin interrupt detected.

can you please let me know what did you do to trigger aux timeout?

It does not happen on me at my test.


As I wrote, I'd probably prefer to see enable_irq() and disable_irq() calls gone.

ok, i will move enable_irq() out of here.



Regards,
Bjorn