lib/igt_debufs: Add IGT_NO_FORCEWAKE environment variable

If IGT_NO_FORCEWAKE is set, skip the forcewake open. Useful when you
want to poke at register without otherwise disturbing the GPU.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
This commit is contained in:
Ville Syrjälä 2014-06-11 19:21:27 +03:00
parent aba3582bb4
commit a49906e266

View File

@ -618,6 +618,8 @@ void igt_enable_prefault(void)
*/ */
int igt_open_forcewake_handle(void) int igt_open_forcewake_handle(void)
{ {
if (getenv("IGT_NO_FORCEWAKE"))
return -1;
return igt_debugfs_open("i915_forcewake_user", O_WRONLY); return igt_debugfs_open("i915_forcewake_user", O_WRONLY);
} }