OSDN Git Service

drm/i915: Move the .global_resources() hook call into modeset_update_crtc_power_domains()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 6 Nov 2014 12:49:12 +0000 (14:49 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 7 Nov 2014 17:42:19 +0000 (18:42 +0100)
commit50f6e502718fd187f8e11a7b5048b21f85ac77e4
tree3f9035b8cea2532b50c962879c71c2b54beace99
parent28855d2ac349b3fbb285c38493429dd1aa503523
drm/i915: Move the .global_resources() hook call into modeset_update_crtc_power_domains()

We may need to access various hardware bits in the .global_resources()
hook, so move the call to occur after enabling all the newly required
power wells, but before disabling all the now unneeded wells. This
should guarantee that we have all the sufficient hardware resources
available during the .global_resources() call. And if not, any additional
resources must be explicitly acquired by the .global_resorces() hook.

For instance on VLV/CHV we need to access the gunit mailbox so that we
can talk to punit/cck over sideband. In addition some PFI credit
reprogramming may need to be addes as well, which may require the disp2d
well.

This should also make the power domain refcounts consistent on platforms
which don't have a .global_resource() hook since now they too will
call modeset_update_crtc_power_domains() which will drop the init power.
Previously init power was just left enabled for such platforms.

Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c