[Intel-gfx] [PATCH i-g-t] tests/pm_rpm: Fix CRASH on machines that lack LLC

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 2 15:28:15 UTC 2016

On Wed, Mar 02, 2016 at 05:01:19PM +0200, Imre Deak wrote:
> Ah right, I missed that, thanks for explaining. But we still need to
> make sure the device is suspended before the set-cache-level call, that
> is an initial disable_all_screens() and then wait_for_suspended()
> before calling set-cache-level.

To me it would be clearer then to split it up into a disable_all_screens()
before the loop and wait_for_suspend() inside before the second
set-cache, and drop the enable_one_screen(). (That way the test is
focusing on the set-cache-level itself and not confusing the
reader/coverage with the display power blocks).

You also want the wait_for_suspended() before the memset, to ensure the
fault handler is also rpm away, but that is checked elsewhere so not

Hmm, this file has a noticeable lack of GEM domain management. E.g.
gem_mmap_subtest() will only work by happenstance on !llc with

To test the shrinker and eviction code, you can use i915_drop_caches.
First populate the GGTT using a GTT mmap, then
igt_drop_caches_set(DROP_BOUND); (Unbind looks best to be exercised
through gem_close, though adding DROP_EVICT_GGTT seems sane).

I don't see how you detect the number of illegal accesses whilst
suspended? Should we not have a counter exposed through debugfs?

Chris Wilson, Intel Open Source Technology Centre

More information about the Intel-gfx mailing list