]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
drm/i915: Move load time init of clock gating hooks earlier
authorImre Deak <imre.deak@intel.com>
Wed, 16 Mar 2016 11:38:54 +0000 (13:38 +0200)
committerImre Deak <imre.deak@intel.com>
Thu, 17 Mar 2016 13:22:04 +0000 (15:22 +0200)
commitbb400da99836793ade6f1a007db58af2f1b57e9e
treec4985ae166da402239d8a00ed12c4d9ea46a6e87
parent8821294172f0f807b7928909aeadd4e7467d2ed0
drm/i915: Move load time init of clock gating hooks earlier

Split out the part initing the clock gating hooks and move it earlier.
Add a new NOP hook for platforms without the need to apply clockgating
or workaround settings, so that the hook can be called unconditionally.
Also add a WARN for future platforms that forget to add a hook.

The rest of the hooks in intel_init_pm() should be inited in the same
way, but atm some of the hooks are set only conditionally, so before
doing this we need to make the setup unconditional and use instead some
flags.

v2:
- add a NOP hook and WARN if no hook is set for the platform (Chris)
- use the term hook instead of callback for these functions (Jani)
v3:
- remove the GEN4() check it's already covered by earlier platform
  checks (Chris)

CC: Jani Nikula <jani.nikula@intel.com>
CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1458128348-15730-6-git-send-email-imre.deak@intel.com
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c