Skip to content

Commit 17f1b1a

Browse files
TinaZhangZWzhenyw
authored andcommitted
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 <[email protected]> Signed-off-by: Zhenyu Wang <[email protected]>
1 parent 5180edc commit 17f1b1a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/gpu/drm/i915/gvt/scheduler.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,12 @@ static int dispatch_workload(struct intel_vgpu_workload *workload)
203203
if (ret)
204204
goto out;
205205

206-
ret = intel_gvt_scan_and_shadow_wa_ctx(&workload->wa_ctx);
207-
if (ret)
208-
goto out;
206+
if ((workload->ring_id == RCS) &&
207+
(workload->wa_ctx.indirect_ctx.size != 0)) {
208+
ret = intel_gvt_scan_and_shadow_wa_ctx(&workload->wa_ctx);
209+
if (ret)
210+
goto out;
211+
}
209212

210213
ret = populate_shadow_context(workload);
211214
if (ret)

0 commit comments

Comments
 (0)