1. 16 6月, 2016 3 次提交
    • U
      PM / Domains: Remove redundant pm_request_idle() call in genpd · 9b002b8f
      Ulf Hansson 提交于
      The PM core increases the runtime PM usage count at the system PM prepare
      phase. Later when the system resumes, it does a pm_runtime_put() in the
      complete phase, which in addition to decrementing the usage count, does
      the equivalent of a pm_request_idle().
      
      Therefore the call to pm_request_idle() from within genpd's ->complete()
      callback is redundant, so remove it.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NKevin Hilman <khilman@baylibre.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9b002b8f
    • U
      PM / Domains: Remove redundant wrapper functions for system PM · 80018853
      Ulf Hansson 提交于
      Due to the previous changes in genpd, which removed the suspend_power_off
      flag, several of the system PM callbacks no longer do any additional
      checks but only invoke corresponding pm_generic_* helper functions.
      
      To clean up the code, drop these wrapper functions as they have
      become redundant. Instead, assign the system PM callbacks directly
      to the pm_generic_*() helper functions.
      
      While changing this, it has bocame clear that some of the current
      system PM callbacks in genpd invoke wrong driver callbacks. For
      example, the genpd's ->restore() callback invokes pm_generic_resume(),
      while that should be pm_generic_restore(). Fix that as well.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NKevin Hilman <khilman@baylibre.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      80018853
    • U
      PM / Domains: Allow genpd to power on during system PM phases · 39dd0f23
      Ulf Hansson 提交于
      If a PM domain is powered off when the first device starts its system PM
      prepare phase, genpd prevents any further attempts to power on the PM
      domain during the following system PM phases. Not until the system PM
      complete phase is finalized for all devices in the PM domain, genpd again
      allows it to be powered on.
      
      This behaviour needs to be changed, as a subsystem/driver for a device in
      the same PM domain may still need to be able to serve requests in some of
      the system PM phases. Accordingly, it may need to runtime resume its
      device and thus also request the corresponding PM domain to be powered on.
      
      To deal with these scenarios, let's make the device operational in the
      system PM prepare phase by runtime resuming it, no matter if the PM domain
      is powered on or off. Changing this also enables us to remove genpd's
      suspend_power_off flag, as it's being used to track this condition.
      Additionally, we must allow the PM domain to be powered on via runtime PM
      during the system PM phases.
      
      This change also requires a fix in the AMD ACP (Audio CoProcessor) drm
      driver. It registers a genpd to model the ACP as a PM domain, but
      unfortunately it's also abuses genpd's "internal" suspend_power_off flag
      to deal with a corner case at system PM resume.
      
      More precisely, the so called SMU block powers on the ACP at system PM
      resume, unconditionally if it's being used or not. This may lead to that
      genpd's internal status of the power state, may not correctly reflect the
      power state of the HW after a system PM resume.
      
      Because of changing the behaviour of genpd, by runtime resuming devices in
      the prepare phase, the AMD ACP drm driver no longer have to deal with this
      corner case. So let's just drop the related code in this driver.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NKevin Hilman <khilman@baylibre.com>
      Acked-by: NMaruthi Bayyavarapu <maruthi.bayyavarapu@amd.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      39dd0f23
  2. 11 6月, 2016 2 次提交
  3. 10 6月, 2016 22 次提交
  4. 09 6月, 2016 13 次提交