[PATCH 1/3] drm/xe: early-return for SR-IOV VF in C6 funcs
Xin Wang
x.wang at intel.com
Mon Aug 25 22:32:17 UTC 2025
VF drivers can't access any of gtidle control registers. By
returning early when IS_SRIOV_VF() is true, we avoid executing
the assertions.
Suggested-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
Signed-off-by: Xin Wang <x.wang at intel.com>
---
drivers/gpu/drm/xe/xe_gt_idle.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c b/drivers/gpu/drm/xe/xe_gt_idle.c
index ffb210216aa9..611c506bdad1 100644
--- a/drivers/gpu/drm/xe/xe_gt_idle.c
+++ b/drivers/gpu/drm/xe/xe_gt_idle.c
@@ -377,12 +377,12 @@ int xe_gt_idle_init(struct xe_gt_idle *gtidle)
void xe_gt_idle_enable_c6(struct xe_gt *gt)
{
- xe_device_assert_mem_access(gt_to_xe(gt));
- xe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GT);
-
if (IS_SRIOV_VF(gt_to_xe(gt)))
return;
+ xe_device_assert_mem_access(gt_to_xe(gt));
+ xe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GT);
+
/* Units of 1280 ns for a total of 5s */
xe_mmio_write32(>->mmio, RC_IDLE_HYSTERSIS, 0x3B9ACA);
/* Enable RC6 */
@@ -392,12 +392,12 @@ void xe_gt_idle_enable_c6(struct xe_gt *gt)
void xe_gt_idle_disable_c6(struct xe_gt *gt)
{
- xe_device_assert_mem_access(gt_to_xe(gt));
- xe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GT);
-
if (IS_SRIOV_VF(gt_to_xe(gt)))
return;
+ xe_device_assert_mem_access(gt_to_xe(gt));
+ xe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GT);
+
xe_mmio_write32(>->mmio, RC_CONTROL, 0);
xe_mmio_write32(>->mmio, RC_STATE, 0);
}
--
2.43.0
More information about the Intel-xe
mailing list