drm/i915: Use existing power well IDs where possible
authorImre Deak <imre.deak@intel.com>
Mon, 6 Aug 2018 09:58:42 +0000 (12:58 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 8 Aug 2018 10:51:20 +0000 (13:51 +0300)
commitd9fcdc8d1f8e7b12111bb410abc4c27c411aa5d9
tree740f45abcba9f83e779150f84f677b08fdcdfc73
parent2183b49933fce40eaf406e0ccfb57a3d4c50d9b8
drm/i915: Use existing power well IDs where possible

There is no need for separate IDs for power wells on a new platform with
the same functionality as an other power well on a previous platform, we
can just reuse the ID from the previous platform. This is only possible
after the previous patches where we removed dependence on the actual
enum values.

This also fixes a problem on ICL where in assert_can_enable_dc5/9() we
would've failed to look up the PW#2 power well.

v2:
- Keep an ID assigned for the ICL PW#2 power well too. (Paulo)

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
[Added comment about the ICL PW#2 fix to the commit log]
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-10-imre.deak@intel.com
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_runtime_pm.c