[PATCH v1 1/1] drm/xe/vf: Allow VF direct access to extended registers

Piórkowski, Piotr piotr.piorkowski at intel.com
Fri Dec 6 13:39:29 UTC 2024


From: Piotr Piórkowski <piotr.piorkowski at intel.com>

While VF by default does not have access to regular registers except
allowed ones, the rule is reversed for extended registers - VF has
access to all except forbidden ones.
So let's allow direct access for extended registers by default.

Signed-off-by: Piotr Piórkowski <piotr.piorkowski at intel.com>
---
 drivers/gpu/drm/xe/xe_mmio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index a48f239cad1c..b6f64b78deda 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -233,7 +233,7 @@ void xe_mmio_write32(struct xe_mmio *mmio, struct xe_reg reg, u32 val)
 
 	trace_xe_reg_rw(mmio, true, addr, val, sizeof(val));
 
-	if (!reg.vf && mmio->sriov_vf_gt)
+	if (!reg.ext && !reg.vf && mmio->sriov_vf_gt)
 		xe_gt_sriov_vf_write32(mmio->sriov_vf_gt, reg, val);
 	else
 		writel(val, mmio->regs + addr);
@@ -247,7 +247,7 @@ u32 xe_mmio_read32(struct xe_mmio *mmio, struct xe_reg reg)
 	/* Wa_15015404425 */
 	mmio_flush_pending_writes(mmio);
 
-	if (!reg.vf && mmio->sriov_vf_gt)
+	if (!reg.ext && !reg.vf && mmio->sriov_vf_gt)
 		val = xe_gt_sriov_vf_read32(mmio->sriov_vf_gt, reg);
 	else
 		val = readl(mmio->regs + addr);
-- 
2.34.1



More information about the Intel-xe mailing list