drm/i915: Merge the PPS register definitions
authorImre Deak <imre.deak@intel.com>
Wed, 10 Aug 2016 11:07:29 +0000 (14:07 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 10 Aug 2016 13:00:07 +0000 (16:00 +0300)
commit44cb734cd2ea09e4fb8166fdd1f0ef65af3a95de
tree2e1ed41f2b189e47b8121e9fde851f83227e2ac6
parent774439e12b53daff3c97d71669a233d6e5290e79
drm/i915: Merge the PPS register definitions

The PPS registers are pretty much the same everywhere, the differences
being:
- Register fields appearing, disappearing from one platform to the
  next: panel-reset-on-powerdown, backlight-on, panel-port,
  register-unlock
- Different register base addresses
- Different number of PPS instances: 2 on VLV/CHV/BXT, 1 everywhere
  else.

We can merge the separate set of PPS definitions by extending the PPS
instance argument to all platforms and using instance 0 on platforms
with a single instance. This means we'll need to calculate the register
addresses dynamically based on the given platform and PPS instance.

v2:
- Simplify if ladder in intel_pps_get_registers(). (Ville)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470827254-21954-1-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/i915_suspend.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_lvds.c