aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gt/intel_context_types.h
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2021-09-09 09:47:32 -0700
committerJohn Harrison <John.C.Harrison@Intel.com>2021-09-13 11:30:38 -0700
commitd2420c2ed8f1bae5f36f681aad73b3d4c5a57d39 (patch)
tree7318efe8b4aaab4c14b368e85e383bc58f979a73 /drivers/gpu/drm/i915/gt/intel_context_types.h
parentdrm/i915/guc: Copy whole golden context, set engine state size of subset (diff)
downloadlinux-dev-d2420c2ed8f1bae5f36f681aad73b3d4c5a57d39.tar.xz
linux-dev-d2420c2ed8f1bae5f36f681aad73b3d4c5a57d39.zip
drm/i915/selftests: Add initial GuC selftest for scrubbing lost G2H
While debugging an issue with full GT resets I went down a rabbit hole thinking the scrubbing of lost G2H wasn't working correctly. This proved to be incorrect as this was working just fine but this chase inspired me to write a selftest to prove that this works. This simple selftest injects errors dropping various G2H and then issues a full GT reset proving that the scrubbing of these G2H doesn't blow up. v2: (Daniel Vetter) - Use ifdef instead of macros for selftests v3: (Checkpatch) - A space after 'switch' statement v4: (Daniele) - A comment saying GT won't idle if G2H are lost Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210909164744.31249-12-matthew.brost@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_context_types.h')
-rw-r--r--drivers/gpu/drm/i915/gt/intel_context_types.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_context_types.h b/drivers/gpu/drm/i915/gt/intel_context_types.h
index e54351a170e2..3a73f3117873 100644
--- a/drivers/gpu/drm/i915/gt/intel_context_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_context_types.h
@@ -198,6 +198,24 @@ struct intel_context {
*/
u8 guc_prio;
u32 guc_prio_count[GUC_CLIENT_PRIORITY_NUM];
+
+#ifdef CONFIG_DRM_I915_SELFTEST
+ /**
+ * @drop_schedule_enable: Force drop of schedule enable G2H for selftest
+ */
+ bool drop_schedule_enable;
+
+ /**
+ * @drop_schedule_disable: Force drop of schedule disable G2H for
+ * selftest
+ */
+ bool drop_schedule_disable;
+
+ /**
+ * @drop_deregister: Force drop of deregister G2H for selftest
+ */
+ bool drop_deregister;
+#endif
};
#endif /* __INTEL_CONTEXT_TYPES__ */