summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gvt/scheduler.c
diff options
context:
space:
mode:
authorTina Zhang2017-03-16 04:16:01 +0100
committerZhenyu Wang2017-03-17 09:46:45 +0100
commit17f1b1a6d4e5f41df161eb2a90af22c003a243fc (patch)
tree322e1532d76b7779205a3e789b5ce668eefaee67 /drivers/gpu/drm/i915/gvt/scheduler.c
parentdrm/i915/kvmgt: fix suspicious rcu dereference usage (diff)
downloadkernel-qcow2-linux-17f1b1a6d4e5f41df161eb2a90af22c003a243fc.tar.gz
kernel-qcow2-linux-17f1b1a6d4e5f41df161eb2a90af22c003a243fc.tar.xz
kernel-qcow2-linux-17f1b1a6d4e5f41df161eb2a90af22c003a243fc.zip
drm/i915/gvt: scan shadow indirect context image when valid
The shadow indirect context image should be only scanned when valid. So far, Only RCS ring has the shadow indirect context image. This patch limits the scan logic only for RCS ring. v2. refine description of the subject v3. fix alignment. (Zhenyu) Signed-off-by: Tina Zhang <tina.zhang@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/scheduler.c')
-rw-r--r--drivers/gpu/drm/i915/gvt/scheduler.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
index dd8f8cc69a76..907e6bc794f6 100644
--- a/drivers/gpu/drm/i915/gvt/scheduler.c
+++ b/drivers/gpu/drm/i915/gvt/scheduler.c
@@ -203,9 +203,12 @@ static int dispatch_workload(struct intel_vgpu_workload *workload)
if (ret)
goto out;
- ret = intel_gvt_scan_and_shadow_wa_ctx(&workload->wa_ctx);
- if (ret)
- goto out;
+ if ((workload->ring_id == RCS) &&
+ (workload->wa_ctx.indirect_ctx.size != 0)) {
+ ret = intel_gvt_scan_and_shadow_wa_ctx(&workload->wa_ctx);
+ if (ret)
+ goto out;
+ }
ret = populate_shadow_context(workload);
if (ret)