From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
Matt Roper <matthew.d.roper@intel.com>
Subject: [Intel-xe] [PATCH v2 11/15] drm/xe/xe2: Add MOCS table
Date: Fri, 18 Aug 2023 15:08:20 -0700 [thread overview]
Message-ID: <20230818220824.700519-12-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20230818220824.700519-1-lucas.demarchi@intel.com>
From: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Additional minor change to remove L4_2_RESERVED, which will never be
required.
v2: Make L3/L4 names consistent for GLOB_MOCS defines (Matt Roper)
Bspec: 71582
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
---
drivers/gpu/drm/xe/xe_mocs.c | 29 +++++++++++++++++++++++------
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_mocs.c b/drivers/gpu/drm/xe/xe_mocs.c
index c9653978fc9f..c120090ef9b4 100644
--- a/drivers/gpu/drm/xe/xe_mocs.c
+++ b/drivers/gpu/drm/xe/xe_mocs.c
@@ -62,13 +62,15 @@ struct xe_mocs_info {
#define L3_LKUP(value) ((value) << 7)
/* Defines for the tables (GLOB_MOCS_0 - GLOB_MOCS_16) */
-#define _L4_CACHEABILITY REG_GENMASK(3, 2)
-#define IG_PAT REG_BIT(8)
+#define IG_PAT REG_BIT(8)
+#define L3_CACHE_POLICY_MASK REG_GENMASK(5, 4)
+#define L4_CACHE_POLICY_MASK REG_GENMASK(3, 2)
/* Helper defines */
#define GEN9_NUM_MOCS_ENTRIES 64 /* 63-64 are reserved, but configured. */
#define PVC_NUM_MOCS_ENTRIES 3
#define MTL_NUM_MOCS_ENTRIES 16
+#define XE2_NUM_MOCS_ENTRIES 16
/* (e)LLC caching options */
/*
@@ -93,10 +95,14 @@ struct xe_mocs_info {
#define L3_3_WB _L3_CACHEABILITY(3)
/* L4 caching options */
-#define L4_0_WB REG_FIELD_PREP(_L4_CACHEABILITY, 0)
-#define L4_1_WT REG_FIELD_PREP(_L4_CACHEABILITY, 1)
-#define L4_2_RESERVED REG_FIELD_PREP(_L4_CACHEABILITY, 2)
-#define L4_3_UC REG_FIELD_PREP(_L4_CACHEABILITY, 3)
+#define L4_0_WB REG_FIELD_PREP(L4_CACHE_POLICY_MASK, 0)
+#define L4_1_WT REG_FIELD_PREP(L4_CACHE_POLICY_MASK, 1)
+#define L4_3_UC REG_FIELD_PREP(L4_CACHE_POLICY_MASK, 3)
+
+#define XE2_L3_0_WB REG_FIELD_PREP(L3_CACHE_POLICY_MASK, 0)
+/* XD: WB Transient Display */
+#define XE2_L3_1_XD REG_FIELD_PREP(L3_CACHE_POLICY_MASK, 1)
+#define XE2_L3_3_UC REG_FIELD_PREP(L3_CACHE_POLICY_MASK, 3)
#define MOCS_ENTRY(__idx, __control_value, __l3cc_value) \
[__idx] = { \
@@ -370,6 +376,17 @@ static const struct xe_mocs_entry mtl_mocs_desc[] = {
L3_GLBGO(1) | L3_1_UC),
};
+static const struct xe_mocs_entry xe2_mocs_table[] = {
+ /* Defer to PAT */
+ MOCS_ENTRY(0, XE2_L3_0_WB | L4_0_WB, 0),
+ /* Cached L3 + L4 */
+ MOCS_ENTRY(1, IG_PAT | XE2_L3_0_WB | L4_0_WB, 0),
+ /* Uncached L3, Cached L4 */
+ MOCS_ENTRY(2, IG_PAT | XE2_L3_3_UC | L4_0_WB, 0),
+ /* Uncached L3 + L4 */
+ MOCS_ENTRY(3, IG_PAT | XE2_L3_3_UC | L4_3_UC, 0),
+};
+
static unsigned int get_mocs_settings(struct xe_device *xe,
struct xe_mocs_info *info)
{
--
2.40.1
next prev parent reply other threads:[~2023-08-18 22:08 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-18 22:08 [Intel-xe] [PATCH v2 00/15] Add Lunar Lake support Lucas De Marchi
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 01/15] drm/xe/xe2: Update render/compute context image sizes Lucas De Marchi
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 02/15] drm/xe/xe2: Add GT topology readout Lucas De Marchi
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 03/15] drm/xe/xe2: Add MCR register steering for primary GT Lucas De Marchi
2023-08-21 14:32 ` Balasubramani Vivekanandan
2023-08-22 16:55 ` Matt Atwood
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 04/15] drm/xe/xe2: Add MCR register steering for media GT Lucas De Marchi
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 05/15] drm/xe/xe2: Update context image layouts Lucas De Marchi
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 06/15] drm/xe/xe2: Handle fused-off CCS engines Lucas De Marchi
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 07/15] drm/xe/xe2: AuxCCS is no longer used Lucas De Marchi
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 08/15] drm/xe/xe2: Define Xe2_LPG IP features Lucas De Marchi
2023-08-21 14:58 ` Balasubramani Vivekanandan
2023-08-21 16:03 ` Lucas De Marchi
2023-08-22 5:38 ` Balasubramani Vivekanandan
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 09/15] drm/xe/xe2: Define Xe2_LPM " Lucas De Marchi
2023-08-21 14:23 ` Matt Roper
2023-08-21 18:46 ` Lucas De Marchi
2023-08-22 5:41 ` Balasubramani Vivekanandan
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 10/15] drm/xe/xe2: Track VA bits independently of max page table level Lucas De Marchi
2023-08-22 5:54 ` Balasubramani Vivekanandan
2023-08-18 22:08 ` Lucas De Marchi [this message]
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 12/15] drm/xe/xe2: Program GuC's MOCS on Xe2 and beyond Lucas De Marchi
2023-08-22 6:27 ` Balasubramani Vivekanandan
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 13/15] drm/xe/lnl: Add LNL platform definition Lucas De Marchi
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 14/15] drm/xe/lnl: Add GuC firmware definition Lucas De Marchi
2023-08-18 22:08 ` [Intel-xe] [PATCH v2 15/15] drm/xe/lnl: Hook up MOCS table Lucas De Marchi
2023-08-18 22:11 ` [Intel-xe] ✓ CI.Patch_applied: success for Add Lunar Lake support (rev2) Patchwork
2023-08-18 22:11 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-08-18 22:12 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-08-18 22:16 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-08-18 22:17 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-08-18 22:17 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-08-18 22:44 ` [Intel-xe] ✓ CI.BAT: success " 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=20230818220824.700519-12-lucas.demarchi@intel.com \
--to=lucas.demarchi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@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 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.