drm/i915: Constify power well descriptors
authorImre Deak <imre.deak@intel.com>
Mon, 6 Aug 2018 09:58:37 +0000 (12:58 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 8 Aug 2018 10:49:43 +0000 (13:49 +0300)
commitf28ec6f4ea483554aacc59e8eb4a7667ecaf58ad
treef230657cb0e68205b8252237e90cefb21095bede
parent3ae27f7e103d95a820061fa692d0fe53303ccf98
drm/i915: Constify power well descriptors

It makes sense to keep unchanging data const. Extract such fields from
the i915_power_well struct into a new i915_power_well_desc struct that
we initialize during compile time. For the rest of the dynamic
fields allocate an array of i915_power_well objects in i915 dev_priv,
and link to each of these objects their corresponding
i915_power_well_desc object.

v2:
- Fix checkpatch warnings about missing param name in fn declaration and
  lines over 80 chars. (Paulo)
- Move check for unique IDs to __set_power_wells().

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>
[Fixed checkpatch warn in __set_power_wells()]
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180806095843.13294-5-imre.deak@intel.com
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_display.h
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_hdcp.c
drivers/gpu/drm/i915/intel_runtime_pm.c