Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/selftests: Disable runtime pm wakeref tracking for the mock device

commit c50df701d49e ("drm/i915: Enable rpm wakeref tracking
whether runtime pm is enabled or not") enabled wakeref tracking
even for the mock device. Turns out that has somewhat significant
overhead, and on the glacial Core m3's we have in CI the vma
selftests are now exceeding the allotted time budget.

So let's disable the wakeref tracking once again for the mock
device in order to avoid blowing up the selftest runtime.

Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Acked-by: Tomi Sarvela <tomi.p.sarvela@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220204171053.18409-1-ville.syrjala@linux.intel.com

+6
+3
drivers/gpu/drm/i915/intel_runtime_pm.c
··· 77 77 depot_stack_handle_t stack, *stacks; 78 78 unsigned long flags; 79 79 80 + if (rpm->no_wakeref_tracking) 81 + return -1; 82 + 80 83 stack = __save_depot_stack(); 81 84 if (!stack) 82 85 return -1;
+1
drivers/gpu/drm/i915/intel_runtime_pm.h
··· 51 51 bool available; 52 52 bool suspended; 53 53 bool irqs_enabled; 54 + bool no_wakeref_tracking; 54 55 55 56 #if IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM) 56 57 /*
+2
drivers/gpu/drm/i915/selftests/mock_gem_device.c
··· 161 161 i915_params_copy(&i915->params, &i915_modparams); 162 162 163 163 intel_runtime_pm_init_early(&i915->runtime_pm); 164 + /* wakeref tracking has significant overhead */ 165 + i915->runtime_pm.no_wakeref_tracking = true; 164 166 165 167 /* Using the global GTT may ask questions about KMS users, so prepare */ 166 168 drm_mode_config_init(&i915->drm);