* [PATCH v2 0/3] VF: Avoid reading inaccessible registers
@ 2024-12-10 16:15 Marcin Bernatowicz
2024-12-10 16:15 ` [PATCH 1/3] drm/xe/vf: Don't check has flat ccs in bios on VF Marcin Bernatowicz
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Marcin Bernatowicz @ 2024-12-10 16:15 UTC (permalink / raw)
To: igt-dev
Cc: Marcin Bernatowicz, Adam Miszczak, Jakub Kolakowski,
Lucas De Marchi, Lukasz Laguna, Matt Roper, Michal Wajdeczko,
Michal Winiarski, Narasimha C V, Piotr Piorkowski,
Satyanarayana K V P, Tomasz Lis
From VF-level some registers are not accessible. Don't check for flat
ccs from VF-level, also don't use Wa_22019338487 for VF.
v2: Updated description for has_flat_ccs flag setting on VF
when disabled in BIOS. (Matt)
Reworked workaround ommision on VF to use the RTP mechanism. (Matt)
Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Narasimha C V <narasimha.c.v@intel.com>
Cc: Piotr Piorkowski <piotr.piorkowski@intel.com>
Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
Jakub Kolakowski (1):
drm/xe/vf: Don't check has flat ccs in bios on VF
Marcin Bernatowicz (2):
drm/xe/rtp: Add match helper to omit SR-IOV VF device
drm/xe/vf: Don't apply Wa_22019338487 for VF
drivers/gpu/drm/xe/xe_device.c | 2 +-
drivers/gpu/drm/xe/xe_rtp.c | 5 +++++
drivers/gpu/drm/xe/xe_rtp.h | 11 +++++++++++
drivers/gpu/drm/xe/xe_wa_oob.rules | 2 +-
4 files changed, 18 insertions(+), 2 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] drm/xe/vf: Don't check has flat ccs in bios on VF
2024-12-10 16:15 [PATCH v2 0/3] VF: Avoid reading inaccessible registers Marcin Bernatowicz
@ 2024-12-10 16:15 ` Marcin Bernatowicz
2024-12-10 16:15 ` [PATCH 2/3] drm/xe/rtp: Add match helper to omit SR-IOV VF device Marcin Bernatowicz
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Marcin Bernatowicz @ 2024-12-10 16:15 UTC (permalink / raw)
To: igt-dev
Cc: Jakub Kolakowski, Piotr Piórkowski, Adam Miszczak,
Lukasz Laguna, Marcin Bernatowicz, Michal Wajdeczko,
Michal Winiarski, Narasimha C V, Satyanarayana K V P, Tomasz Lis,
Matt Roper
From: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Don't check for flat ccs from VF-level as VF does not have direct
access to the register.
If the BIOS disables FlatCCS support (a use-case that will nearly never
be used) and the has_flat_ccs flag is set, there shouldn't be
any functional impact. The hardware will drop writes to the CCS region,
and reads from the CCS region will always return 0.
For the native case, the flag is disabled if the BIOS disables
it to avoid unnecessary overhead in buffer object (BO) creation
and migration.
Signed-off-by: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Suggested-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Narasimha C V <narasimha.c.v@intel.com>
Cc: Piotr Piorkowski <piotr.piorkowski@intel.com>
Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
---
drivers/gpu/drm/xe/xe_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 56d4ffb650da..ec0ea9c914b4 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -604,7 +604,7 @@ static int probe_has_flat_ccs(struct xe_device *xe)
u32 reg;
/* Always enabled/disabled, no runtime check to do */
- if (GRAPHICS_VER(xe) < 20 || !xe->info.has_flat_ccs)
+ if (GRAPHICS_VER(xe) < 20 || !xe->info.has_flat_ccs || IS_SRIOV_VF(xe))
return 0;
gt = xe_root_mmio_gt(xe);
--
2.31.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] drm/xe/rtp: Add match helper to omit SR-IOV VF device
2024-12-10 16:15 [PATCH v2 0/3] VF: Avoid reading inaccessible registers Marcin Bernatowicz
2024-12-10 16:15 ` [PATCH 1/3] drm/xe/vf: Don't check has flat ccs in bios on VF Marcin Bernatowicz
@ 2024-12-10 16:15 ` Marcin Bernatowicz
2024-12-10 16:15 ` [PATCH 3/3] drm/xe/vf: Don't apply Wa_22019338487 for VF Marcin Bernatowicz
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Marcin Bernatowicz @ 2024-12-10 16:15 UTC (permalink / raw)
To: igt-dev
Cc: Marcin Bernatowicz, Adam Miszczak, Jakub Kolakowski,
Lucas De Marchi, Lukasz Laguna, Matt Roper, Michal Wajdeczko,
Michal Winiarski, Narasimha C V, Piotr Piorkowski,
Satyanarayana K V P, Tomasz Lis
Add a match helper that allows the application of a workaround
when the device is not an SR-IOV VF (Virtual Function) device.
Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Narasimha C V <narasimha.c.v@intel.com>
Cc: Piotr Piorkowski <piotr.piorkowski@intel.com>
Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
---
drivers/gpu/drm/xe/xe_rtp.c | 5 +++++
drivers/gpu/drm/xe/xe_rtp.h | 11 +++++++++++
2 files changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index b13d4d62f0b1..7a1c78fdfc92 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -340,3 +340,8 @@ bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
return dss >= dss_per_gslice;
}
+bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt,
+ const struct xe_hw_engine *hwe)
+{
+ return !IS_SRIOV_VF(gt_to_xe(gt));
+}
diff --git a/drivers/gpu/drm/xe/xe_rtp.h b/drivers/gpu/drm/xe/xe_rtp.h
index 827d932b6908..7dea10d732d7 100644
--- a/drivers/gpu/drm/xe/xe_rtp.h
+++ b/drivers/gpu/drm/xe/xe_rtp.h
@@ -476,4 +476,15 @@ bool xe_rtp_match_first_render_or_compute(const struct xe_gt *gt,
bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
const struct xe_hw_engine *hwe);
+/*
+ * xe_rtp_match_not_sriov_vf - Match when not on SR-IOV VF device
+ *
+ * @gt: GT structure
+ * @hwe: Engine instance
+ *
+ * Returns: true if device is not VF, false otherwise.
+ */
+bool xe_rtp_match_not_sriov_vf(const struct xe_gt *gt,
+ const struct xe_hw_engine *hwe);
+
#endif
--
2.31.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] drm/xe/vf: Don't apply Wa_22019338487 for VF
2024-12-10 16:15 [PATCH v2 0/3] VF: Avoid reading inaccessible registers Marcin Bernatowicz
2024-12-10 16:15 ` [PATCH 1/3] drm/xe/vf: Don't check has flat ccs in bios on VF Marcin Bernatowicz
2024-12-10 16:15 ` [PATCH 2/3] drm/xe/rtp: Add match helper to omit SR-IOV VF device Marcin Bernatowicz
@ 2024-12-10 16:15 ` Marcin Bernatowicz
2024-12-10 18:13 ` ✗ Fi.CI.BUILD: failure for VF: Avoid reading inaccessible registers Patchwork
2024-12-10 20:05 ` [PATCH v2 0/3] " Matt Roper
4 siblings, 0 replies; 6+ messages in thread
From: Marcin Bernatowicz @ 2024-12-10 16:15 UTC (permalink / raw)
To: igt-dev
Cc: Marcin Bernatowicz, Adam Miszczak, Jakub Kolakowski,
Lucas De Marchi, Lukasz Laguna, Matt Roper, Michal Wajdeczko,
Michal Winiarski, Narasimha C V, Piotr Piorkowski,
Satyanarayana K V P, Tomasz Lis
Don't use Wa_22019338487 for VF.
Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Narasimha C V <narasimha.c.v@intel.com>
Cc: Piotr Piorkowski <piotr.piorkowski@intel.com>
Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
---
drivers/gpu/drm/xe/xe_wa_oob.rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_wa_oob.rules b/drivers/gpu/drm/xe/xe_wa_oob.rules
index 3ed12a85cc60..40438c3d9b72 100644
--- a/drivers/gpu/drm/xe/xe_wa_oob.rules
+++ b/drivers/gpu/drm/xe/xe_wa_oob.rules
@@ -34,7 +34,7 @@
GRAPHICS_VERSION(2004)
22019338487 MEDIA_VERSION(2000)
GRAPHICS_VERSION(2001)
- MEDIA_VERSION(3000), MEDIA_STEP(A0, B0)
+ MEDIA_VERSION(3000), MEDIA_STEP(A0, B0), FUNC(xe_rtp_match_not_sriov_vf)
22019338487_display PLATFORM(LUNARLAKE)
16023588340 GRAPHICS_VERSION(2001)
14019789679 GRAPHICS_VERSION(1255)
--
2.31.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* ✗ Fi.CI.BUILD: failure for VF: Avoid reading inaccessible registers
2024-12-10 16:15 [PATCH v2 0/3] VF: Avoid reading inaccessible registers Marcin Bernatowicz
` (2 preceding siblings ...)
2024-12-10 16:15 ` [PATCH 3/3] drm/xe/vf: Don't apply Wa_22019338487 for VF Marcin Bernatowicz
@ 2024-12-10 18:13 ` Patchwork
2024-12-10 20:05 ` [PATCH v2 0/3] " Matt Roper
4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2024-12-10 18:13 UTC (permalink / raw)
To: Marcin Bernatowicz; +Cc: igt-dev
== Series Details ==
Series: VF: Avoid reading inaccessible registers
URL : https://patchwork.freedesktop.org/series/142361/
State : failure
== Summary ==
Applying: drm/xe/vf: Don't check has flat ccs in bios on VF
Patch failed at 0001 drm/xe/vf: Don't check has flat ccs in bios on VF
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/3] VF: Avoid reading inaccessible registers
2024-12-10 16:15 [PATCH v2 0/3] VF: Avoid reading inaccessible registers Marcin Bernatowicz
` (3 preceding siblings ...)
2024-12-10 18:13 ` ✗ Fi.CI.BUILD: failure for VF: Avoid reading inaccessible registers Patchwork
@ 2024-12-10 20:05 ` Matt Roper
4 siblings, 0 replies; 6+ messages in thread
From: Matt Roper @ 2024-12-10 20:05 UTC (permalink / raw)
To: Marcin Bernatowicz
Cc: igt-dev, Adam Miszczak, Jakub Kolakowski, Lucas De Marchi,
Lukasz Laguna, Michal Wajdeczko, Michal Winiarski, Narasimha C V,
Piotr Piorkowski, Satyanarayana K V P, Tomasz Lis
On Tue, Dec 10, 2024 at 05:15:22PM +0100, Marcin Bernatowicz wrote:
> From VF-level some registers are not accessible. Don't check for flat
> ccs from VF-level, also don't use Wa_22019338487 for VF.
>
> v2: Updated description for has_flat_ccs flag setting on VF
> when disabled in BIOS. (Matt)
> Reworked workaround ommision on VF to use the RTP mechanism. (Matt)
I think you might have sent this to the wrong mailing list? This looks
like it should probably be on intel-xe rather than igt-dev.
Matt
>
> Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
> Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Cc: Lukasz Laguna <lukasz.laguna@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Cc: Narasimha C V <narasimha.c.v@intel.com>
> Cc: Piotr Piorkowski <piotr.piorkowski@intel.com>
> Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
> Cc: Tomasz Lis <tomasz.lis@intel.com>
>
> Jakub Kolakowski (1):
> drm/xe/vf: Don't check has flat ccs in bios on VF
>
> Marcin Bernatowicz (2):
> drm/xe/rtp: Add match helper to omit SR-IOV VF device
> drm/xe/vf: Don't apply Wa_22019338487 for VF
>
> drivers/gpu/drm/xe/xe_device.c | 2 +-
> drivers/gpu/drm/xe/xe_rtp.c | 5 +++++
> drivers/gpu/drm/xe/xe_rtp.h | 11 +++++++++++
> drivers/gpu/drm/xe/xe_wa_oob.rules | 2 +-
> 4 files changed, 18 insertions(+), 2 deletions(-)
>
> --
> 2.31.1
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-12-10 20:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-10 16:15 [PATCH v2 0/3] VF: Avoid reading inaccessible registers Marcin Bernatowicz
2024-12-10 16:15 ` [PATCH 1/3] drm/xe/vf: Don't check has flat ccs in bios on VF Marcin Bernatowicz
2024-12-10 16:15 ` [PATCH 2/3] drm/xe/rtp: Add match helper to omit SR-IOV VF device Marcin Bernatowicz
2024-12-10 16:15 ` [PATCH 3/3] drm/xe/vf: Don't apply Wa_22019338487 for VF Marcin Bernatowicz
2024-12-10 18:13 ` ✗ Fi.CI.BUILD: failure for VF: Avoid reading inaccessible registers Patchwork
2024-12-10 20:05 ` [PATCH v2 0/3] " Matt Roper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox