drm/i915: Move per-platform power well hooks to intel_display_power_well.c
authorImre Deak <imre.deak@intel.com>
Thu, 14 Apr 2022 21:06:40 +0000 (00:06 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 20 Apr 2022 17:41:39 +0000 (20:41 +0300)
commit2cef35958da89500f30e2693b4f8ca898e27ae34
tree9a14137ac66a810e97b8efa206b009b7f3dc1e31
parent1e53f9e41400e548a1112bc9b973eabddc9eb79b
drm/i915: Move per-platform power well hooks to intel_display_power_well.c

Move the implementation of platform specific power well hooks to
intel_display_power_well.c, to reduce the clutter in
intel_display_power.c.

The locking of all the power domain/power well state is handled in the
power domain functions in intel_display_power.c using
i915_power_domains::lock. This patch also moves the
chy_phy_powergate_ch/lanes() functions to intel_display_power_well.c
which borrow the same lock to protect the DISPLAY_PHY_CONTROL register
state, which the HW uses both for toggling power wells and power gating
PHY lanes.

No functional change.

v2:
- Clarify in the commit log why CHV functions using the
  i915_power_domains::lock were moved, while others locking the power
  domain/well state were kept in intel_display_power.c . (Jouni)
- Move forward declaration of chv_phy_powergate_ch/lanes() to
  intel_display_power_well.h .

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220414210657.1785773-1-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_display_power.c
drivers/gpu/drm/i915/display/intel_display_power.h
drivers/gpu/drm/i915/display/intel_display_power_well.c
drivers/gpu/drm/i915/display/intel_display_power_well.h
drivers/gpu/drm/i915/display/intel_dpio_phy.c
drivers/gpu/drm/i915/display/intel_pps.c