[PATCH 2/8] drm/xe/vf: Don't try to capture engine data unavailable to VF
Rodrigo Vivi
rodrigo.vivi at intel.com
Fri Jan 12 21:15:37 UTC 2024
On Fri, Jan 12, 2024 at 04:26:43PM +0100, Michal Wajdeczko wrote:
> Don't capture engine ring registers as thoe are not available for
> the VF driver.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
> drivers/gpu/drm/xe/xe_hw_engine.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
> index e279ef6c527c..5722f7ef8ce5 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine.c
> +++ b/drivers/gpu/drm/xe/xe_hw_engine.c
> @@ -25,6 +25,7 @@
> #include "xe_reg_sr.h"
> #include "xe_rtp.h"
> #include "xe_sched_job.h"
> +#include "xe_sriov.h"
> #include "xe_tuning.h"
> #include "xe_uc_fw.h"
> #include "xe_wa.h"
> @@ -771,6 +772,10 @@ xe_hw_engine_snapshot_capture(struct xe_hw_engine *hwe)
> hwe->domain);
> snapshot->mmio_base = hwe->mmio_base;
>
> + /* no more VF accessible data below this point */
> + if (IS_SRIOV_VF(gt_to_xe(hwe->gt)))
> + return snapshot;
> +
I haven't carefully verified all the registers below this point, but they
all seems to be related to the CS, so it looks like this is the right way
to go. Maybe split in a separated function?! But anyways:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> snapshot->reg.ring_hwstam = hw_engine_mmio_read32(hwe, RING_HWSTAM(0));
> snapshot->reg.ring_hws_pga = hw_engine_mmio_read32(hwe,
> RING_HWS_PGA(0));
> --
> 2.25.1
>
More information about the Intel-xe
mailing list