All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prathap Kumar Valsan <prathap.kumar.valsan@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] i915/gem_mocs_settings: Add mocs table for icelake
Date: Sat,  9 Feb 2019 14:50:47 -0500	[thread overview]
Message-ID: <20190209195047.27721-1-prathap.kumar.valsan@intel.com> (raw)

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

             reply	other threads:[~2019-02-09 19:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-09 19:50 Prathap Kumar Valsan [this message]
2019-02-09 19:55 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_mocs_settings: Add mocs table for icelake 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
2019-02-09 19:54 [igt-dev] [PATCH i-g-t] " Prathap Kumar Valsan
2019-02-15 21:46 Prathap Kumar Valsan via igt-dev
2019-02-20  8:33 ` Szwichtenberg, Radoslaw
2019-02-21 22:48 ` Lucas De Marchi
2019-02-21 23:42   ` Chris Wilson
2019-02-22 17:49     ` Lucas De Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190209195047.27721-1-prathap.kumar.valsan@intel.com \
    --to=prathap.kumar.valsan@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.