File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
drivers/gpu/drm/i915/gt/uc Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -4817,6 +4817,8 @@ void intel_guc_find_hung_context(struct intel_engine_cs *engine)
4817
4817
4818
4818
xa_lock_irqsave (& guc -> context_lookup , flags );
4819
4819
xa_for_each (& guc -> context_lookup , index , ce ) {
4820
+ bool found ;
4821
+
4820
4822
if (!kref_get_unless_zero (& ce -> ref ))
4821
4823
continue ;
4822
4824
@@ -4833,17 +4835,26 @@ void intel_guc_find_hung_context(struct intel_engine_cs *engine)
4833
4835
goto next ;
4834
4836
}
4835
4837
4838
+ found = false;
4839
+ spin_lock (& ce -> guc_state .lock );
4836
4840
list_for_each_entry (rq , & ce -> guc_state .requests , sched .link ) {
4837
4841
if (i915_test_request_state (rq ) != I915_REQUEST_ACTIVE )
4838
4842
continue ;
4839
4843
4844
+ found = true;
4845
+ break ;
4846
+ }
4847
+ spin_unlock (& ce -> guc_state .lock );
4848
+
4849
+ if (found ) {
4840
4850
intel_engine_set_hung_context (engine , ce );
4841
4851
4842
4852
/* Can only cope with one hang at a time... */
4843
4853
intel_context_put (ce );
4844
4854
xa_lock (& guc -> context_lookup );
4845
4855
goto done ;
4846
4856
}
4857
+
4847
4858
next :
4848
4859
intel_context_put (ce );
4849
4860
xa_lock (& guc -> context_lookup );
You can’t perform that action at this time.
0 commit comments