Skip to content

Commit

Permalink
drm/i915/gvt: scan shadow indirect context image when valid
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tina Zhang authored and Zhenyu Wang committed Mar 17, 2017
1 parent 5180edc commit 17f1b1a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/gpu/drm/i915/gvt/scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 17f1b1a

Please sign in to comment.