[Intel-gfx] [RFC i-g-t] tests: add runtime_pm

Daniel Vetter daniel at ffwll.ch
Fri Nov 8 19:42:53 CET 2013


On Fri, Nov 8, 2013 at 7:19 PM, Paulo Zanoni <przanoni at gmail.com> wrote:
>> I think we discussed this in some meeting, and
>> GTT maps were the only thing that came to my mind. But IIRC you
>> said that you weren't actually sure whether GTT maps still work in
>> PC8. Has that been verified or is it still an open question?
>
> Daniel also asked for this test. This week I finally had some time to
> go back to this. I just added a test for GTT mmaps and the test fails
> while we're on D3 (didn't try PC8-without-D3 yet). Clever ideas on how
> to fix the problem are always welcome :)

You need to rip out all userspace mmaps when entering D3 (which is
fairly expensive to do and will hurt on wakeup when userspace renders
again) and then make sure the chip wakes up again when handling the
fault.

So in a way a gtt mmap holds a weak D3 reference - it doesn't prevent
D3 (we'll never enter it otherwise), but if we enter D3 we need to
remove them all.

The functions you're looking for is unmap_mapping_range on the entire
drm address_space (see how drm_vma_node_unmap uses it only for a given
gtt mmap). And then i915_gem_fault, where we need to wake-up the chip
again.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list