From 9f925cd39bab3c53472791dda4d02a3fbf9f3fcd Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 24 Jul 2019 16:06:36 -0700 Subject: i915/gem_mocs_settings: add MOCS table for Tiger Lake Some small changes compared to Ice Lake, namely: - Removed entries 0 and 1: they are now reserved and shouldn't be used - Entries 16, 17, 48..61 were previously unused and are now available Signed-off-by: Lucas De Marchi Reviewed-by: Daniele Ceraolo Spurio --- tests/i915/gem_mocs_settings.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'tests') diff --git a/tests/i915/gem_mocs_settings.c b/tests/i915/gem_mocs_settings.c index d6cdf68d..6aa8f366 100644 --- a/tests/i915/gem_mocs_settings.c +++ b/tests/i915/gem_mocs_settings.c @@ -78,6 +78,40 @@ struct mocs_table { }; /* The first entries in the MOCS tables are defined by uABI */ + +static const struct mocs_entry tigerlake_mocs_table[GEN11_NUM_MOCS_ENTRIES] = { + [2] = { 0x00000037, 0x0030, 0x1}, + [3] = { 0x00000005, 0x0010, 0x1}, + [4] = { 0x00000005, 0x0030, 0x1}, + [5] = { 0x00000037, 0x0010, 0x1}, + [6] = { 0x00000017, 0x0010, 0x1}, + [7] = { 0x00000017, 0x0030, 0x1}, + [8] = { 0x00000027, 0x0010, 0x1}, + [9] = { 0x00000027, 0x0030, 0x1}, + [10] = { 0x00000077, 0x0010, 0x1}, + [11] = { 0x00000077, 0x0030, 0x1}, + [12] = { 0x00000057, 0x0010, 0x1}, + [13] = { 0x00000057, 0x0030, 0x1}, + [14] = { 0x00000067, 0x0010, 0x1}, + [15] = { 0x00000067, 0x0030, 0x1}, + [16] = { 0x00004005, 0x0010, 0x1}, + [17] = { 0x00004005, 0x0030, 0x1}, + [18] = { 0x00060037, 0x0030, 0x1}, + [19] = { 0x00000737, 0x0030, 0x1}, + [20] = { 0x00000337, 0x0030, 0x1}, + [21] = { 0x00000137, 0x0030, 0x1}, + [22] = { 0x000003b7, 0x0030, 0x1}, + [23] = { 0x000007b7, 0x0030, 0x1}, + [48] = { 0x00000037, 0x0030, 0x1}, + [49] = { 0x00000005, 0x0030, 0x1}, + [50] = { 0x00000037, 0x0010, 0x1}, + [51] = { 0x00000005, 0x0010, 0x1}, + [60] = { 0x00000037, 0x0010, 0x1}, + [61] = { 0x00004005, 0x0030, 0x1}, + [62] = { 0x00000037, 0x0010, 0x1}, + [63] = { 0x00000037, 0x0010, 0x1}, +}; + static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES] = { [0] = { 0x00000005, 0x0010, 0x1}, [1] = ICELAKE_MOCS_PTE, @@ -158,6 +192,10 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->size = ARRAY_SIZE(icelake_mocs_table); table->table = icelake_mocs_table; result = true; + } else if (IS_TIGERLAKE(devid)) { + table->size = ARRAY_SIZE(tigerlake_mocs_table); + table->table = tigerlake_mocs_table; + result = true; } return result; -- cgit v1.2.3