[PATCH 09/10] drm/xe/vf: Setup memory based interrupts in GuC

Matt Roper matthew.d.roper at intel.com
Wed Dec 13 00:52:50 UTC 2023


On Tue, Dec 12, 2023 at 10:00:53PM +0100, Michal Wajdeczko wrote:
> When Memory Based Interrupts are used, the VF driver must provide
> to the GuC references to the Source and Status Report Pages.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>

As noted on the earlier patch, it might be worth moving the
implementation of xe_memirq_init_guc() into this patch where it actually
gets used?  Up to you; either way,

Reviewed-by: Matt Roper <matthew.d.roper at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_guc.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 482cb0df9f15..85096741cb3b 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -22,8 +22,10 @@
>  #include "xe_guc_log.h"
>  #include "xe_guc_pc.h"
>  #include "xe_guc_submit.h"
> +#include "xe_memirq.h"
>  #include "xe_mmio.h"
>  #include "xe_platform_types.h"
> +#include "xe_sriov.h"
>  #include "xe_uc.h"
>  #include "xe_uc_fw.h"
>  #include "xe_wa.h"
> @@ -574,10 +576,20 @@ static void guc_enable_irq(struct xe_guc *guc)
>  
>  int xe_guc_enable_communication(struct xe_guc *guc)
>  {
> +	struct xe_device *xe = guc_to_xe(guc);
>  	int err;
>  
>  	guc_enable_irq(guc);
>  
> +	if (IS_SRIOV_VF(xe) && xe_device_has_memirq(xe)) {
> +		struct xe_gt *gt = guc_to_gt(guc);
> +		struct xe_tile *tile = gt_to_tile(gt);
> +
> +		err = xe_memirq_init_guc(&tile->sriov.vf.memirq, guc);
> +		if (err)
> +			return err;
> +	}
> +
>  	xe_mmio_rmw32(guc_to_gt(guc), PMINTRMSK,
>  		      ARAT_EXPIRED_INTRMSK, 0);
>  
> -- 
> 2.25.1
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the Intel-xe mailing list