All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] i915/gem_mocs_settings: Add mocs table for icelake
@ 2019-02-09 19:50 Prathap Kumar Valsan
  2019-02-09 19:55 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Prathap Kumar Valsan @ 2019-02-09 19:50 UTC (permalink / raw)
  To: igt-dev

From: "Kumar Valsan, Prathap" <prathap.kumar.valsan@intel.com>

This patch adds mocs table for icelake with expected L3 and eDRAM
control values.

Signed-off-by: Kumar Valsan, Prathap <prathap.kumar.valsan@intel.com>
---
 tests/i915/gem_mocs_settings.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tests/i915/gem_mocs_settings.c b/tests/i915/gem_mocs_settings.c
index 5b3b6bc1..bae245ef 100644
--- a/tests/i915/gem_mocs_settings.c
+++ b/tests/i915/gem_mocs_settings.c
@@ -73,6 +73,18 @@ struct mocs_table {
 };
 
 /* The first entries in the MOCS tables are defined by uABI */
+static const struct mocs_entry icelake_mocs_table[] = {
+	{ 0x00000005, 0x0010 },
+	{ 0x00000004, 0x0030 },
+	{ 0x00000037, 0x0030 },
+};
+
+static const struct mocs_entry dirty_icelake_mocs_table[] = {
+	{ 0x0007FFFF, 0x003F },
+	{ 0x0007FFFF, 0x003F },
+	{ 0x0007FFFF, 0x003F },
+};
+
 static const struct mocs_entry skylake_mocs_table[] = {
 	{ 0x00000009, 0x0010 },
 	{ 0x00000038, 0x0030 },
@@ -127,6 +139,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty)
 			table->table = broxton_mocs_table;
 		}
 		result = true;
+	} else if (IS_ICELAKE(devid)) {
+		if (dirty) {
+			table->size  = ARRAY_SIZE(dirty_icelake_mocs_table);
+			table->table = dirty_icelake_mocs_table;
+		} else {
+			table->size  = ARRAY_SIZE(icelake_mocs_table);
+			table->table = icelake_mocs_table;
+		}
+		result = true;
 	}
 
 	return result;
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-14 15:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-09 19:50 [igt-dev] [PATCH i-g-t] i915/gem_mocs_settings: Add mocs table for icelake Prathap Kumar Valsan
2019-02-09 19:55 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-02-09 21:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-11 18:39 ` [igt-dev] [PATCH i-g-t] " Lucas De Marchi
2019-02-14 15:46 ` [igt-dev] [PATCH i-g-t v2] " Prathap Kumar Valsan via igt-dev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.