[PATCH 1/2] drm/i915/gvt: Remove one assumption in indirect/per BB ctx scan
Wang, Zhi A
zhi.a.wang at intel.com
Thu Oct 19 06:03:52 UTC 2017
Yours are better. :) Take yours then.
-----Original Message-----
From: intel-gvt-dev [mailto:intel-gvt-dev-bounces at lists.freedesktop.org] On Behalf Of Zhenyu Wang
Sent: Thursday, October 19, 2017 8:50 AM
To: Zhi Wang <zhi.wang.linux at gmail.com>
Cc: intel-gvt-dev at lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915/gvt: Remove one assumption in indirect/per BB ctx scan
On 2017.10.19 02:30:08 +0800, Zhi Wang wrote:
> Previously GVT-g assumes the guest has to use indirect/per BB ctx scan
> at the same time. But this is actually not correct.
>
> Fixes: be1da7070aea ("drm/i915/gvt: vGPU command scanner")
> Signed-off-by: Zhi Wang <zhi.a.wang at intel.com>
> ---
oh, didn't see this when sending my fix ;)
I think maybe checking valid bit is better?
> drivers/gpu/drm/i915/gvt/cmd_parser.c | 3 ++-
> drivers/gpu/drm/i915/gvt/scheduler.c | 2 --
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c
> b/drivers/gpu/drm/i915/gvt/cmd_parser.c
> index 272d6f9..f3c30af 100644
> --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
> +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
> @@ -2790,7 +2790,8 @@ int intel_gvt_scan_and_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
> return ret;
> }
>
> - combine_wa_ctx(wa_ctx);
> + if (wa_ctx->per_ctx.guest_gma)
> + combine_wa_ctx(wa_ctx);
>
> ret = scan_wa_ctx(wa_ctx);
> if (ret) {
> diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c
> b/drivers/gpu/drm/i915/gvt/scheduler.c
> index 4acfcfc..7e88c00 100644
> --- a/drivers/gpu/drm/i915/gvt/scheduler.c
> +++ b/drivers/gpu/drm/i915/gvt/scheduler.c
> @@ -1261,8 +1261,6 @@ intel_vgpu_create_workload(struct intel_vgpu *vgpu, int ring_id,
> CACHELINE_BYTES;
> workload->wa_ctx.per_ctx.guest_gma =
> per_ctx & PER_CTX_ADDR_MASK;
> -
> - WARN_ON(workload->wa_ctx.indirect_ctx.size && !(per_ctx & 0x1));
> }
>
> gvt_dbg_el("workload %p ring id %d head %x tail %x start %x ctl
> %x\n",
> --
> 2.7.4
>
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
More information about the intel-gvt-dev
mailing list