@@ -1951,7 +1951,7 @@ eb_find_first_request_added(struct i915_execbuffer *eb)
19511951#if IS_ENABLED (CONFIG_DRM_I915_CAPTURE_ERROR )
19521952
19531953/* Stage with GFP_KERNEL allocations before we enter the signaling critical path */
1954- static void eb_capture_stage (struct i915_execbuffer * eb )
1954+ static int eb_capture_stage (struct i915_execbuffer * eb )
19551955{
19561956 const unsigned int count = eb -> buffer_count ;
19571957 unsigned int i = count , j ;
@@ -1964,6 +1964,10 @@ static void eb_capture_stage(struct i915_execbuffer *eb)
19641964 if (!(flags & EXEC_OBJECT_CAPTURE ))
19651965 continue ;
19661966
1967+ if (i915_gem_context_is_recoverable (eb -> gem_context ) &&
1968+ (IS_DGFX (eb -> i915 ) || GRAPHICS_VER_FULL (eb -> i915 ) > IP_VER (12 , 0 )))
1969+ return - EINVAL ;
1970+
19671971 for_each_batch_create_order (eb , j ) {
19681972 struct i915_capture_list * capture ;
19691973
@@ -1976,6 +1980,8 @@ static void eb_capture_stage(struct i915_execbuffer *eb)
19761980 eb -> capture_lists [j ] = capture ;
19771981 }
19781982 }
1983+
1984+ return 0 ;
19791985}
19801986
19811987/* Commit once we're in the critical path */
@@ -2017,8 +2023,9 @@ static void eb_capture_list_clear(struct i915_execbuffer *eb)
20172023
20182024#else
20192025
2020- static void eb_capture_stage (struct i915_execbuffer * eb )
2026+ static int eb_capture_stage (struct i915_execbuffer * eb )
20212027{
2028+ return 0 ;
20222029}
20232030
20242031static void eb_capture_commit (struct i915_execbuffer * eb )
@@ -3410,7 +3417,9 @@ i915_gem_do_execbuffer(struct drm_device *dev,
34103417 }
34113418
34123419 ww_acquire_done (& eb .ww .ctx );
3413- eb_capture_stage (& eb );
3420+ err = eb_capture_stage (& eb );
3421+ if (err )
3422+ goto err_vma ;
34143423
34153424 out_fence = eb_requests_create (& eb , in_fence , out_fence_fd );
34163425 if (IS_ERR (out_fence )) {
0 commit comments