1. 08 Jan, 2024 3 commits
    • Imre Deak's avatar
      drm/i915: Keep the connector polled state disabled after storm · f7d16a53
      Imre Deak authored
      If an HPD IRQ storm is detected on a connector during driver loading or
      system suspend/resume - disabling the IRQ and switching to polling - the
      polling may get disabled too early - before the intended 2 minute
      HPD_STORM_REENABLE_DELAY - with the HPD IRQ staying disabled for this
      duration. One such sequence is:
      
      Thread#1                                   Thread#2
      intel_display_driver_probe()->
        intel_hpd_init()->
          (HPD IRQ gets enabled)
        .                                        intel_hpd_irq_handler()->
        .                                          intel_hpd_irq_storm_detect()
        .                                            intel_hpd_irq_setup()->
        .                                              (HPD IRQ gets disabled)
        .                                         queue_delayed_work(hotplug.hotplug_work)
        .                                         ...
        .                                         i915_hotplug_work_func()->
        .                                           intel_hpd_irq_storm_switch_to_polling()->
        .                                             (polling enabled)
        .
        intel_hpd_poll_disable()->
          queue_work(hotplug.poll_init_work)
        ...
        i915_hpd_poll_init_work()->
          (polling gets disabled,
           HPD IRQ is still disabled)
        ...
      
        (Connector is neither polled or
         detected via HPD IRQs for 2 minutes)
      
        intel_hpd_irq_storm_reenable_work()->
          (HPD IRQ gets enabled)
      
      To avoid the above 2 minute state without either polling or enabled HPD
      IRQ, leave the connector's polling mode unchanged in
      i915_hpd_poll_init_work() if its HPD IRQ got disabled after an IRQ storm
      indicated by the connector's HPD_DISABLED pin state.
      
      Link: https://patchwork.freedesktop.org/patch/msgid/20240104083008.2715733-3-imre.deak@intel.comReviewed-by: default avatarJouni Högander <jouni.hogander@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      f7d16a53
    • Imre Deak's avatar
      drm/i915: Init DRM connector polled field early · 289d4180
      Imre Deak authored
      After an HPD IRQ storm on a connector intel_hpd_irq_storm_detect() will
      set the connector's HPD pin state to HPD_MARK_DISABLED and the IRQ gets
      disabled. Subsequently intel_hpd_irq_storm_switch_to_polling() will
      enable polling for these connectors, setting the pin state to
      HPD_DISABLED, but only if the connector's base.polled field is set to
      DRM_CONNECTOR_POLL_HPD. intel_hpd_irq_storm_reenable_work() will
      reenable the IRQ - after 2 minutes -  if the pin state is HPD_DISABLED.
      
      The connectors will be created with their base.polled field set to 0,
      which gets initialized only later in i915_hpd_poll_init_work() (using
      intel_connector::polled). If a storm is detected on a connector after
      it's created and IRQs are enabled on it - by intel_hpd_init() - and
      before its bease.polled field is initialized in the above work, the
      connector's HPD pin will stay in the HPD_MARK_DISABLED state - leaving
      the IRQ disabled indefinitely - and polling will not get enabled on it as
      intended.
      
      I can't see a reason for initializing base.polled in a delayed manner,
      so do this already when creating the connector, to prevent the above
      race condition.
      
      Link: https://patchwork.freedesktop.org/patch/msgid/20240104083008.2715733-2-imre.deak@intel.comReviewed-by: default avatarJouni Högander <jouni.hogander@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      289d4180
    • Mika Kahola's avatar
      drm/i915/display: Use helper to select C20 MPLLA/B · 0fa64765
      Mika Kahola authored
      We used to select between MPLLA/B with the following
      
      state->tx[0] & C20_PHY_USE_MPLLB
      
      Since this is used a few places within C20 PLL setting,
      let's introduce a helper function to clean up the code
      a bit.
      Signed-off-by: default avatarMika Kahola <mika.kahola@intel.com>
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240105112243.224199-1-mika.kahola@intel.com
      0fa64765
  2. 05 Jan, 2024 6 commits
  3. 04 Jan, 2024 5 commits
  4. 03 Jan, 2024 1 commit
  5. 29 Dec, 2023 1 commit
  6. 22 Dec, 2023 8 commits
  7. 20 Dec, 2023 1 commit
  8. 19 Dec, 2023 7 commits
  9. 18 Dec, 2023 5 commits
  10. 15 Dec, 2023 1 commit
  11. 13 Dec, 2023 2 commits