Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH v2] drm/i915/tgl: MOCS table fixes
Date: Mon, 11 Nov 2019 13:59:59 -0800	[thread overview]
Message-ID: <20191111215959.1634-1-matthew.d.roper@intel.com> (raw)
In-Reply-To: <20191111203730.czdgdkrfh2mxd7jt@ldmartin-desk1>

The bspec was just updated with a couple corrections to the TGL MOCS
table.  Entries 16 and 17 are marked as reserved (overriding the value
we inherit from GEN11_MOCS_ENTRIES) and entry 61 shouldn't have the
LE_SCF bit applied.

Note that since we're intentionally/explicitly overriding table entries
from GEN11_MOCS_ENTRIES we should suppress the 'override-init' compiler
warnings for the TGL table.

v2:
 - Add a MOCS_ENTRY_UNUSED() and use it to declare the
   explicitly-reserved MOCS entries. (Lucas)
 - Move the warning suppression from the Makefile to a #pragma that only
   affects the TGL table. (Lucas)

Bspec: 45101
Fixes: 2ddf992179c4 ("drm/i915/tgl: Define MOCS entries for Tigerlake")
Cc: Tomasz Lis <tomasz.lis@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_mocs.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_mocs.c b/drivers/gpu/drm/i915/gt/intel_mocs.c
index 6e881c735b20..4ae07650bfcb 100644
--- a/drivers/gpu/drm/i915/gt/intel_mocs.c
+++ b/drivers/gpu/drm/i915/gt/intel_mocs.c
@@ -91,6 +91,9 @@ struct drm_i915_mocs_table {
 		.used = 1, \
 	}
 
+#define MOCS_ENTRY_UNUSED(__idx) \
+	[__idx] = { .used = 0 }
+
 /*
  * MOCS tables
  *
@@ -241,14 +244,20 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = {
 		   LE_3_WB | LE_TC_1_LLC | LE_LRUM(3), \
 		   L3_1_UC)
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Woverride-init"
 static const struct drm_i915_mocs_entry tigerlake_mocs_table[] = {
 	/* Base - Error (Reserved for Non-Use) */
-	MOCS_ENTRY(0, 0x0, 0x0),
+	MOCS_ENTRY_UNUSED(0),
 	/* Base - Reserved */
-	MOCS_ENTRY(1, 0x0, 0x0),
+	MOCS_ENTRY_UNUSED(1),
 
 	GEN11_MOCS_ENTRIES,
 
+	/* Reserved (overrides values from GEN11_MOCS_ENTRIES) */
+	MOCS_ENTRY_UNUSED(16),
+	MOCS_ENTRY_UNUSED(17),
+
 	/* Implicitly enable L1 - HDC:L1 + L3 + LLC */
 	MOCS_ENTRY(48,
 		   LE_3_WB | LE_TC_1_LLC | LE_LRUM(3),
@@ -271,9 +280,10 @@ static const struct drm_i915_mocs_entry tigerlake_mocs_table[] = {
 		   L3_1_UC),
 	/* HW Special Case (Displayable) */
 	MOCS_ENTRY(61,
-		   LE_1_UC | LE_TC_1_LLC | LE_SCF(1),
+		   LE_1_UC | LE_TC_1_LLC,
 		   L3_3_WB),
 };
+#pragma GCC diagnostic pop
 
 static const struct drm_i915_mocs_entry icelake_mocs_table[] = {
 	/* Base - Uncached (Deprecated) */
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [Intel-gfx] [PATCH v2] drm/i915/tgl: MOCS table fixes
Date: Mon, 11 Nov 2019 13:59:59 -0800	[thread overview]
Message-ID: <20191111215959.1634-1-matthew.d.roper@intel.com> (raw)
Message-ID: <20191111215959.ny4NaMVD2F-MBsxkxNqueEhx5YUaaoaN0alrcFMfan8@z> (raw)
In-Reply-To: <20191111203730.czdgdkrfh2mxd7jt@ldmartin-desk1>

The bspec was just updated with a couple corrections to the TGL MOCS
table.  Entries 16 and 17 are marked as reserved (overriding the value
we inherit from GEN11_MOCS_ENTRIES) and entry 61 shouldn't have the
LE_SCF bit applied.

Note that since we're intentionally/explicitly overriding table entries
from GEN11_MOCS_ENTRIES we should suppress the 'override-init' compiler
warnings for the TGL table.

v2:
 - Add a MOCS_ENTRY_UNUSED() and use it to declare the
   explicitly-reserved MOCS entries. (Lucas)
 - Move the warning suppression from the Makefile to a #pragma that only
   affects the TGL table. (Lucas)

Bspec: 45101
Fixes: 2ddf992179c4 ("drm/i915/tgl: Define MOCS entries for Tigerlake")
Cc: Tomasz Lis <tomasz.lis@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_mocs.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_mocs.c b/drivers/gpu/drm/i915/gt/intel_mocs.c
index 6e881c735b20..4ae07650bfcb 100644
--- a/drivers/gpu/drm/i915/gt/intel_mocs.c
+++ b/drivers/gpu/drm/i915/gt/intel_mocs.c
@@ -91,6 +91,9 @@ struct drm_i915_mocs_table {
 		.used = 1, \
 	}
 
+#define MOCS_ENTRY_UNUSED(__idx) \
+	[__idx] = { .used = 0 }
+
 /*
  * MOCS tables
  *
@@ -241,14 +244,20 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = {
 		   LE_3_WB | LE_TC_1_LLC | LE_LRUM(3), \
 		   L3_1_UC)
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Woverride-init"
 static const struct drm_i915_mocs_entry tigerlake_mocs_table[] = {
 	/* Base - Error (Reserved for Non-Use) */
-	MOCS_ENTRY(0, 0x0, 0x0),
+	MOCS_ENTRY_UNUSED(0),
 	/* Base - Reserved */
-	MOCS_ENTRY(1, 0x0, 0x0),
+	MOCS_ENTRY_UNUSED(1),
 
 	GEN11_MOCS_ENTRIES,
 
+	/* Reserved (overrides values from GEN11_MOCS_ENTRIES) */
+	MOCS_ENTRY_UNUSED(16),
+	MOCS_ENTRY_UNUSED(17),
+
 	/* Implicitly enable L1 - HDC:L1 + L3 + LLC */
 	MOCS_ENTRY(48,
 		   LE_3_WB | LE_TC_1_LLC | LE_LRUM(3),
@@ -271,9 +280,10 @@ static const struct drm_i915_mocs_entry tigerlake_mocs_table[] = {
 		   L3_1_UC),
 	/* HW Special Case (Displayable) */
 	MOCS_ENTRY(61,
-		   LE_1_UC | LE_TC_1_LLC | LE_SCF(1),
+		   LE_1_UC | LE_TC_1_LLC,
 		   L3_3_WB),
 };
+#pragma GCC diagnostic pop
 
 static const struct drm_i915_mocs_entry icelake_mocs_table[] = {
 	/* Base - Uncached (Deprecated) */
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-11-11 21:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 19:07 [PATCH] drm/i915/tgl: MOCS table fixes Matt Roper
2019-11-11 19:07 ` [Intel-gfx] " Matt Roper
2019-11-11 20:37 ` Lucas De Marchi
2019-11-11 20:37   ` [Intel-gfx] " Lucas De Marchi
2019-11-11 20:57   ` Matt Roper
2019-11-11 20:57     ` [Intel-gfx] " Matt Roper
2019-11-11 21:59   ` Matt Roper [this message]
2019-11-11 21:59     ` [Intel-gfx] [PATCH v2] " Matt Roper
2019-11-11 23:02   ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tgl: MOCS table fixes (rev2) Patchwork
2019-11-11 23:02     ` [Intel-gfx] " Patchwork
2019-11-11 23:03   ` ✗ Fi.CI.SPARSE: " Patchwork
2019-11-11 23:03     ` [Intel-gfx] " Patchwork
2019-11-11 23:55   ` ✗ Fi.CI.BAT: failure " Patchwork
2019-11-11 23:55     ` [Intel-gfx] " Patchwork
2019-11-11 20:44 ` ✓ Fi.CI.BAT: success for drm/i915/tgl: MOCS table fixes Patchwork
2019-11-11 20:44   ` [Intel-gfx] " Patchwork

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=20191111215959.1634-1-matthew.d.roper@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox