1. 13 Aug, 2021 1 commit
    • Imre Deak's avatar
      fbdev/efifb: Release PCI device's runtime PM ref during FB destroy · 55285e21
      Imre Deak authored
      Atm the EFI FB platform driver gets a runtime PM reference for the
      associated GFX PCI device during probing the EFI FB platform device and
      releases it only when the platform device gets unbound.
      
      When fbcon switches to the FB provided by the PCI device's driver (for
      instance i915/drmfb), the EFI FB will get only unregistered without the
      EFI FB platform device getting unbound, keeping the runtime PM reference
      acquired during the platform device probing. This reference will prevent
      the PCI driver from runtime suspending the device.
      
      Fix this by releasing the RPM reference from the EFI FB's destroy hook,
      called when the FB gets unregistered.
      
      While at it assert that pm_runtime_get_sync() didn't fail.
      
      v2:
      - Move pm_runtime_get_sync() before register_framebuffer() to avoid its
        race wrt. efifb_destroy()->pm_runtime_put(). (Daniel)
      - Assert that pm_runtime_get_sync() didn't fail.
      - Clarify commit message wrt. platform/PCI device/driver and driver
        removal vs. device unbinding.
      
      Fixes: a6c0fd3d ("efifb: Ensure graphics device for efifb stays at PCI D0")
      Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Acked-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210809133146.2478382-1-imre.deak@intel.com
      55285e21
  2. 12 Aug, 2021 1 commit
  3. 11 Aug, 2021 3 commits
  4. 06 Aug, 2021 1 commit
  5. 03 Aug, 2021 2 commits
  6. 02 Aug, 2021 2 commits
  7. 30 Jul, 2021 25 commits
  8. 29 Jul, 2021 5 commits