@@ -37,6 +37,12 @@ void i915_error_page_walk(struct i915_address_space *vm,
int i915_error_state_to_aub(struct drm_i915_error_state_buf *m,
const struct i915_gpu_state *error);
+static inline bool i915_error_state_should_capture(struct i915_vma *vma,
+ struct i915_vma *batch)
+{
+ return ((INTEL_GEN(vma->vm->i915) >= 8) && (vma != batch));
+}
+
#else
static inline void i915_error_record_ppgtt(struct i915_gpu_state *error,
@@ -62,6 +68,12 @@ static inline int i915_error_state_to_aub(struct drm_i915_error_state_buf *m,
return 0;
}
+static inline bool i915_error_state_should_capture(struct i915_vma *vma,
+ struct i915_vma *batch)
+{
+ return false;
+}
+
#endif
#endif
@@ -38,6 +38,7 @@
#include "i915_drv.h"
#include "i915_gem_clflush.h"
#include "i915_trace.h"
+#include "i915_aubcrash.h"
#include "intel_drv.h"
#include "intel_frontbuffer.h"
@@ -1758,7 +1759,8 @@ static int eb_move_to_gpu(struct i915_execbuffer *eb)
struct i915_vma *vma = eb->vma[i];
struct drm_i915_gem_object *obj = vma->obj;
- if (flags & EXEC_OBJECT_CAPTURE) {
+ if ((flags & EXEC_OBJECT_CAPTURE) ||
+ i915_error_state_should_capture(vma, eb->batch)) {
struct i915_gem_capture_list *capture;
capture = kmalloc(sizeof(*capture), GFP_KERNEL);
If we want the AUB file to be complete (and, therefore, more useful) we need to capture all BOs in use, we cannot leave that to the UMD as before. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Cc: Chris Wilson <chris@chris-wsilon.co.uk> --- drivers/gpu/drm/i915/i915_aubcrash.h | 12 ++++++++++++ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-)