[igt-dev] [PATCH i-g-t] i915/gem_mocs_settings: Add mocs table for icelake

Chris Wilson chris at chris-wilson.co.uk
Thu Feb 21 23:42:02 UTC 2019


Quoting Lucas De Marchi (2019-02-21 22:48:45)
> static const struct mocs_entry icelake_mocs_pte = { 0x00000004, 0x0030, 0x1 };
> static struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES] = {
>        [0]  = { 0x00000005, 0x0010, 0x1 },
>        [1]  = icelake_mocs_pte,
>        [2]  = { 0x00000037, 0x0030, 0x1 },
> ...
>        [20]  = icelake_mocs_pte,
> ...
> 
> So... you basically define all entries and don't need to overwrite the
> values like you are doing.

/* All unspecified entries default to following PTE */
[0 ... GEN11_NUM_MOCS_ENTRIES-1] = icelake_mocs_pte,

[0] = ...,
[2] = ...,

If I remember my syntax correctly,
-Chris


More information about the igt-dev mailing list