OSDN Git Service

drm/i915: Simplify power well definitions by adding power well instances
authorImre Deak <imre.deak@intel.com>
Thu, 14 Apr 2022 21:06:49 +0000 (00:06 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 20 Apr 2022 17:42:12 +0000 (20:42 +0300)
commit4a845ff0c0d445556ec9e32073ac6cf0cd66e117
treef2cd6f00ceaebd9c23d4c6c95445213862338a14
parent888a2a6312a14ea6f8f50ec886601db2c43179df
drm/i915: Simplify power well definitions by adding power well instances

All the port specific AUX/DDI_IO power wells share the same power well
ops struct and flags, so we can save some space and simplify the
definition of these by listing for all such power wells only the params
specific to them (name, domains, power well register index, id). Move
these params to a new i915_power_well_instance struct and convert the
per-platform power well definitions accordingly.

For all power well instance the name and power domain list params must
be specified, while the register index and id are optional, add the
I915_PW() macro that both simplifies the definitions and ensures that
the required params are set.

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-10-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_display_power_map.c
drivers/gpu/drm/i915/display/intel_display_power_well.c
drivers/gpu/drm/i915/display/intel_display_power_well.h