[Intel-gfx] [PATCH 4/4] drm/i915/selftests: Introduce live tests of private PAT management

Chris Wilson chris at chris-wilson.co.uk
Thu Sep 7 21:30:04 UTC 2017


Quoting Zhi Wang (2017-09-05 20:58:27)
> Introduce two live tests of private PAT managment:
> 
> igt_ppat_init - This test is to check if all the PPAT configuration is
> written into HW.
> 
> igt_ppat_get - This test performs several sub-tests on intel_ppat_get()
> and intel_ppat_put().
> 
> The "perfect match" test case will try to get a PPAT entry with an existing
> value, then check if the returned PPAT entry is the same one.
> 
> The "alloc entries" test case will run out of PPAT table, and check if all
> the requested values are put into the newly allocated PPAT entries.
> 
> The "partial match" test case will generate a parital matched value from
> the existing PPAT table and try to match it.
> 
> The "put entries" test case will free all the PPAT entries that allocated
> in "alloc entries" test case. It will check if the values of freed PPAT
> entries turn into ppat->clear_value.
> 
> An example output of these test cases on my SKL box is:
> 
> [   38.934158] ppat: check private PAT on HW
> [   38.942498] ppat: OK
> [   38.946752] ppat: ppat table before the test
> [   38.955580] ppat 0: 0x7
> [   38.960509] ppat 2: 0xa
> [   38.965484] ppat 3: 0x0
> [   38.970267] ppat 4: 0xb
> [   38.975387] ppat: make sure it's same with HW ppat table
> [   38.985996] ppat: check private PAT on HW
> [   38.994492] ppat: OK
> [   38.998921] ppat: case 1: perfect match
> [   39.006706] ppat: OK
> [   39.011135] ppat: case 2: alloc new entries
> [   39.019825] ppat: alloc new entry value 0x37 index 1
> [   39.029771] ppat: alloc new entry value 0x27 index 5
> [   39.039829] ppat: alloc new entry value 0x17 index 6
> [   39.050076] ppat: alloc new entry value 0x3b index 7
> [   39.059980] ppat: OK
> [   39.064570] ppat: case 3: partial match
> [   39.072354] ppat: generate value 0x2b
> [   39.079432] ppat: partial match entry value 0x3b index 7
> [   39.090219] ppat: put entries
> [   39.096061] ppat: put entry value 0x37 index 1
> [   39.105262] ppat: put entry value 0x27 index 5
> [   39.114150] ppat: put entry value 0x17 index 6
> [   39.123154] ppat: put entry value 0x3b index 7
> [   39.132335] ppat: OK
> [   39.136588] ppat: ppat table after the test
> [   39.145239] ppat 0: 0x7
> [   39.150198] ppat 2: 0xa
> [   39.154981] ppat 3: 0x0
> [   39.160100] ppat 4: 0xb
> [   39.165058] ppat: make sure it's same with HW ppat table
> [   39.175844] ppat: check private PAT on HW
> [   39.184007] ppat: OK
> [   39.188261] ppat: OK

You don't feel this is too verbose? It's just noise (even at pr_debug
and so usually hidden) for the signal is in the failure condition, which
appears well documented.

I couldn't see any failure conditions tested, checking the handling of
ENOSPC and then reallocation will be important.
-Chris


More information about the Intel-gfx mailing list