File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,9 @@ static void release_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
332
332
333
333
i915_gem_object_unpin_map (wa_ctx -> indirect_ctx .obj );
334
334
i915_gem_object_put (wa_ctx -> indirect_ctx .obj );
335
+
336
+ wa_ctx -> indirect_ctx .obj = NULL ;
337
+ wa_ctx -> indirect_ctx .shadow_va = NULL ;
335
338
}
336
339
337
340
static int set_context_ppgtt_from_shadow (struct intel_vgpu_workload * workload ,
@@ -911,11 +914,6 @@ static void complete_current_workload(struct intel_gvt *gvt, int ring_id)
911
914
912
915
list_del_init (& workload -> list );
913
916
914
- if (!workload -> status ) {
915
- release_shadow_batch_buffer (workload );
916
- release_shadow_wa_ctx (& workload -> wa_ctx );
917
- }
918
-
919
917
if (workload -> status || (vgpu -> resetting_eng & ENGINE_MASK (ring_id ))) {
920
918
/* if workload->status is not successful means HW GPU
921
919
* has occurred GPU hang or something wrong with i915/GVT,
@@ -1283,6 +1281,9 @@ void intel_vgpu_destroy_workload(struct intel_vgpu_workload *workload)
1283
1281
{
1284
1282
struct intel_vgpu_submission * s = & workload -> vgpu -> submission ;
1285
1283
1284
+ release_shadow_batch_buffer (workload );
1285
+ release_shadow_wa_ctx (& workload -> wa_ctx );
1286
+
1286
1287
if (workload -> shadow_mm )
1287
1288
intel_vgpu_mm_put (workload -> shadow_mm );
1288
1289
You can’t perform that action at this time.
0 commit comments