[igt-dev] [PATCH i-g-t] i915/gem_mocs_settings: Add mocs table for icelake
Lucas De Marchi
lucas.demarchi at intel.com
Fri Feb 22 17:49:48 UTC 2019
On Thu, Feb 21, 2019 at 11:42:02PM +0000, Chris Wilson wrote:
>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,
yep, but just remember there are holes of unspecified entries, so you
need to do this in the middle of the array by supplying the correct
index, not the number of entries.
Lucas De Marchi
>-Chris
More information about the igt-dev
mailing list