Re: [PATCH v2 4/4] drm/i915: add assert_device_not_suspended to GGTT PTE updaters

Chris Wilson
2015-11-09T21:11:30Z

On Mon, Nov 09, 2015 at 09:14:19PM +0200, Imre Deak wrote:
> The device should be on when updating the GGTT PTEs, so add an assert to
> all relevant places.
>
> v2:
> - use the existing dev_priv directly everywhere (Ville)
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>

For completeness, add one to i915_ggtt_insert_entries(). Yes, I know
that we never will support rpm on any of those devices, but we may as
well be consistent in documenting that these functions will write
through the magic PCI region.

An issue I see here is dev_priv->pm.suspended doesn't actually say that
rpm can't suspend during the GGTT PTEs writes. Would we not want
something more like assert_rpm_wakelock() and !dev_priv->pm.can_suspend?
-Chris

--
Chris Wilson, Intel Open Source Technology Centre