VF: Avoid reading inaccessible registers
Subsystems (2)
v2 cover VF: Avoid reading inaccessible registers
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)
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(-)
Signature · 1 line
2.31.1
PATCH v2 1/3 drm/xe/vf: Don't check has flat ccs in bios on VF
From: Jakub Kolakowski <[email protected]>
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.
--- drivers/gpu/drm/xe/xe_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/xe/xe_device.c +1 -1
@@ -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);
Signature · 1 line
2.31.1
PATCH v2 2/3 drm/xe/rtp: Add match helper to omit SR-IOV VF device
In reply to Marcin BernatowiczAdd a match helper that allows the application of a workaround when the device is not an SR-IOV VF (Virtual Function) device.
--- drivers/gpu/drm/xe/xe_rtp.c | 5 +++++ drivers/gpu/drm/xe/xe_rtp.h | 11 +++++++++++ 2 files changed, 16 insertions(+)
drivers/gpu/drm/xe/xe_rtp.c +5 -0
@@ -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)); +}
drivers/gpu/drm/xe/xe_rtp.h +11 -0
@@ -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
Signature · 1 line
2.31.1
PATCH v2 3/3 drm/xe/vf: Don't apply Wa_22019338487 for VF
In reply to Marcin BernatowiczDon't use Wa_22019338487 for VF.
--- drivers/gpu/drm/xe/xe_wa_oob.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/xe/xe_wa_oob.rules +1 -1
@@ -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)
Signature · 1 line
2.31.1
Patchwork
CI✗ Fi.CI.BUILD: failure for VF: Avoid reading inaccessible registers
In reply to Marcin Bernatowicz== Series Details ==
== 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".
Quoted 6 lines · Marcin Bernatowicz
From VF-level some registers are not accessible. Don't check for flat ccs from VF-level, also don't use
Wa_22019338487for VF.v2: Updated description for
has_flat_ccsflag 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
Quoted 29 lines
Cc Adam Miszczak <[email protected]>Cc Jakub Kolakowski <[email protected]>Cc Lucas De Marchi <[email protected]>Cc Lukasz Laguna <[email protected]>Cc Matt Roper <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc Michal Winiarski <[email protected]>Cc Narasimha C V <[email protected]>Cc Piotr Piorkowski <[email protected]>Cc Satyanarayana K V P <[email protected]>Cc Tomasz Lis <[email protected]>Jakub Kolakowski (1):
drm/xe/vf: Don't check has flat ccs in bios on VFMarcin Bernatowicz (2):
drm/xe/rtp: Add match helper to omit SR-IOV VF device drm/xe/vf: Don't applyWa_22019338487for VFdrivers/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(-)Signature · 1 line
2.31.1
Signature · 4 lines
Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation