[Intel-gfx] [PATCH 4/8] drm/i915: avoid waking up from PC8 on DP AUX operations
Chris Wilson
chris at chris-wilson.co.uk
Tue Jul 30 11:40:11 CEST 2013
On Mon, Jul 29, 2013 at 05:48:23PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni at intel.com>
>
> If we're already allowing PC8, just don't use the IRQs, so we won't
> need to wake from PC8. Waking up from PC8 is a slow thing, so avoid it
> when we can.
This raises the question of why we where holding the power well wake
lock if we weren't using IRQs in the first place. This tells me the
intel_aux_display_runtime_get() interface is indequate, imo. It would
need to be more expressive of why/what part of aux display runtime you
want. You could even move the state checking there so that GMBUS could
use the same interface:
unsigned long intel_aux_display_runtime_get(dev_priv, want, need)
{
if (need) {
__intel_aux_display_runtime_get();
return need;
}
if (want) {
if (hsw_pc8_enabled()) {
__intel_aux_display_runtime_get();
return want;
}
}
return 0;
}
And pass the return value to _put for it to decide if it needs to do
anything (also it can then select its path based on whether or not it
holds a wakeref). Making the caller decide whether or not to act based
on information inside pc8 looks very fragile to me, and easy to break in
future.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list