drm/i915: Markup paired operations on display power domains

The majority of runtime-pm operations are bounded and scoped within a
function; these are easy to verify that the wakeref are handled
correctly. We can employ the compiler to help us, and reduce the number
of wakerefs tracked when debugging, by passing around cookies provided
by the various rpm_get functions to their rpm_put counterpart. This
makes the pairing explicit, and given the required wakeref cookie the
compiler can verify that we pass an initialised value to the rpm_put
(quite handy for double checking error paths).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190114142129.24398-16-chris@chris-wilson.co.uk
This commit is contained in:
Chris Wilson
2019-01-14 14:21:24 +00:00
orang tua d4225a535b
melakukan 0e6e0be4c9
23 mengubah file dengan 346 tambahan dan 189 penghapusan

Melihat File

@@ -1082,6 +1082,6 @@ void intel_dsc_disable(const struct intel_crtc_state *old_crtc_state)
I915_WRITE(dss_ctl2_reg, dss_ctl2_val);
/* Disable Power wells for VDSC/joining */
intel_display_power_put(dev_priv,
intel_dsc_power_domain(old_crtc_state));
intel_display_power_put_unchecked(dev_priv,
intel_dsc_power_domain(old_crtc_state));
}