OSDN Git Service

drm/i915: Convert the u64 power well domains mask to a bitmap
authorImre Deak <imre.deak@intel.com>
Thu, 14 Apr 2022 21:06:48 +0000 (00:06 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 20 Apr 2022 17:42:12 +0000 (20:42 +0300)
commit888a2a6312a14ea6f8f50ec886601db2c43179df
tree2f115cdbbe264f84d6c9a2577e757e3de345221f
parentc32ffce42aa59d054c93b2d63a3b11521dd7490b
drm/i915: Convert the u64 power well domains mask to a bitmap

To remove the aliasing of the power domain enum values in a follow-up
patch in this patchset (requiring a bigger mask) and allow for defining
additional power domains in the future (at least some upcoming TypeC
changes requires this) convert the u64 i915_power_well_desc::domains
mask to a bitmap.

For simplicity I changed the for_each_power_domain_well() macros to
accept one domain only instead of a mask, as there isn't any current
user passing multiple domains.

v2: Don't add a typedef for the bitmap struct. (Jani)

Cc: Jani Nikula <jani.nikula@intel.com>
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-9-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_display.c
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_map.c
drivers/gpu/drm/i915/display/intel_display_power_well.c
drivers/gpu/drm/i915/display/intel_display_power_well.h