[PATCH 4/4] drm/xe/vf: Ignore force-wake requests if VF
Rodrigo Vivi
rodrigo.vivi at intel.com
Mon Jun 10 19:51:28 UTC 2024
On Mon, Jun 10, 2024 at 08:37:57PM +0200, Michal Wajdeczko wrote:
> The control and ack force-wake registers are not accessible for
> the VF drivers. To avoid changing existing code logic that tracks
> woken domains, simply ignore all attempts to access control or ack
> registers if we are running as a VF driver.
>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> ---
> drivers/gpu/drm/xe/xe_force_wake.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_force_wake.c b/drivers/gpu/drm/xe/xe_force_wake.c
> index b0baa9094418..4d472192e87b 100644
> --- a/drivers/gpu/drm/xe/xe_force_wake.c
> +++ b/drivers/gpu/drm/xe/xe_force_wake.c
> @@ -12,6 +12,7 @@
> #include "xe_gt.h"
> #include "xe_gt_printk.h"
> #include "xe_mmio.h"
> +#include "xe_sriov.h"
>
> #define XE_FORCE_WAKE_ACK_TIMEOUT_MS 50
>
> @@ -101,6 +102,9 @@ void xe_force_wake_init_engines(struct xe_gt *gt, struct xe_force_wake *fw)
>
> static void __domain_ctl(struct xe_gt *gt, struct xe_force_wake_domain *domain, bool wake)
> {
> + if (IS_SRIOV(gt_to_xe(gt)))
> + return;
> +
> xe_mmio_write32(gt, domain->reg_ctl, domain->mask | (wake ? domain->val : 0));
> }
>
> @@ -109,6 +113,9 @@ static int __domain_wait(struct xe_gt *gt, struct xe_force_wake_domain *domain,
> u32 value;
> int ret;
>
> + if (IS_SRIOV(gt_to_xe(gt)))
> + return 0;
> +
> ret = xe_mmio_wait32(gt, domain->reg_ack, domain->val, wake ? domain->val : 0,
> XE_FORCE_WAKE_ACK_TIMEOUT_MS * USEC_PER_MSEC,
> &value, true);
> --
> 2.43.0
>
More information about the Intel-xe
mailing list