diff options
author | Mika Kuoppala <mika.kuoppala@intel.com> | 2014-03-25 12:21:44 +0200 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@intel.com> | 2014-04-10 17:40:48 +0300 |
commit | bfa6fa9a4bfdd7988a1ed68c9c97f9cc53d0f50c (patch) | |
tree | 26240f18fdf6243ea20ab9fbe1b74d60d1f93245 /lib/igt_debugfs.h | |
parent | 1c7ca57e531315f78f8ea3b9dce7bd92d7d79f64 (diff) |
lib: add igt_get_stop_rings and igt_set_stop_rings
Multiple tests are introducing hangs by fidding with i915_ring_stop
debugfs entry.
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Diffstat (limited to 'lib/igt_debugfs.h')
-rw-r--r-- | lib/igt_debugfs.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index 3312a8bd..bcd7f762 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -143,4 +143,37 @@ void igt_enable_prefault(void); int igt_open_forcewake_handle(void); +/** + * stop_ring_flags: + * + * @STOP_RING_NONE: Can be used to clear the pending stop (warning: hang might + * be declared already). Returned by igt_get_stop_rings() if there is + * no currently stopped rings. + * @STOP_RING_RENDER: Render ring + * @STOP_RING_BSD: Video encoding/decoding ring + * @STOP_RING_BLT: Blitter ring + * @STOP_RING_VEBOX: Video enchanment ring + * @STOP_RING_ALL: All rings + * @STOP_RING_ALLOW_ERRORS: Driver will not omit expected DRM_ERRORS + * @STOP_RING_ALLOW_BAN: Driver will use context ban policy + * @STOP_RING_DEFAULT: STOP_RING_ALL | STOP_RING_ALLOW_ERRORS + * Enumeration of all supported flags for igt_set_stop_rings(). + * + */ +enum stop_ring_flags { + STOP_RING_NONE = 0x00, + STOP_RING_RENDER = (1 << 0), + STOP_RING_BSD = (1 << 1), + STOP_RING_BLT = (1 << 2), + STOP_RING_VEBOX = (1 << 3), + STOP_RING_ALL = 0xff, + STOP_RING_ALLOW_ERRORS = (1 << 30), + STOP_RING_ALLOW_BAN = (1 << 31), + STOP_RING_DEFAULTS = STOP_RING_ALL | STOP_RING_ALLOW_ERRORS, +}; + +enum stop_ring_flags igt_to_stop_ring_flag(int ring); +void igt_set_stop_rings(enum stop_ring_flags flags); +enum stop_ring_flags igt_get_stop_rings(void); + #endif /* __IGT_DEBUGFS_H__ */ |