Skip to content

Commit

Permalink
drm/xe/vf: Don't try Driver-FLR if VF
Browse files Browse the repository at this point in the history
Driver-FLR can't be triggered from the VF driver, so treat it
as disabled if VF. While around, fix also the message, as it
shouldn't be printed just 'once' as we may have many devices.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250311135726.1998-2-michal.wajdeczko@intel.com
  • Loading branch information
Michal Wajdeczko committed Mar 12, 2025
1 parent de35cc2 commit d3414ac
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions drivers/gpu/drm/xe/xe_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,15 @@ ALLOW_ERROR_INJECTION(xe_device_create, ERRNO); /* See xe_pci_probe() */

static bool xe_driver_flr_disabled(struct xe_device *xe)
{
return xe_mmio_read32(xe_root_tile_mmio(xe), GU_CNTL_PROTECTED) & DRIVERINT_FLR_DIS;
if (IS_SRIOV_VF(xe))
return true;

if (xe_mmio_read32(xe_root_tile_mmio(xe), GU_CNTL_PROTECTED) & DRIVERINT_FLR_DIS) {
drm_info(&xe->drm, "Driver-FLR disabled by BIOS\n");
return true;
}

return false;
}

/*
Expand Down Expand Up @@ -560,10 +568,8 @@ static void __xe_driver_flr(struct xe_device *xe)

static void xe_driver_flr(struct xe_device *xe)
{
if (xe_driver_flr_disabled(xe)) {
drm_info_once(&xe->drm, "BIOS Disabled Driver-FLR\n");
if (xe_driver_flr_disabled(xe))
return;
}

__xe_driver_flr(xe);
}
Expand Down

0 comments on commit d3414ac

Please sign in to comment.