The DMC wakelock code needs to keep track of register offsets that need the wakelock for proper access. If one of the necessary offsets are missed, then the failure in asserting the wakelock is very likely to cause problems down the road. A miss could happen for at least two different reasons: - We might have forgotten to add the offset (or range) to the relevant tables tracked by the driver in the first place. - Or updates to either the DMC firmware or the display IP that require new offsets to be tracked and we fail to realize that. To help capture these cases, let's introduce a debugfs interface for the DMC wakelock. The debugfs exports a file for looking up untracked offsets and another for defining extra ranges to be tracked by our driver during runtime, without the need of edit+re-compile+re-load cycle. See the added documentation and commit message for details. Gustavo Sousa (4): drm/i915/dmc_wl: Pass offset instead of reg to range table iterator drm/i915/dmc_wl: Add debugfs for untracked offsets drm/i915/dmc_wl: Add extra_ranges debugfs drm/i915/dmc_wl: Enable the debugfs only with enable_dmc_wl_debugfs=1 drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915/display/intel_display_debugfs.c | 2 + .../drm/i915/display/intel_display_params.c | 5 + .../drm/i915/display/intel_display_params.h | 1 + drivers/gpu/drm/i915/display/intel_dmc_wl.c | 23 +- drivers/gpu/drm/i915/display/intel_dmc_wl.h | 2 + .../drm/i915/display/intel_dmc_wl_debugfs.c | 517 ++++++++++++++++++ .../drm/i915/display/intel_dmc_wl_debugfs.h | 36 ++ drivers/gpu/drm/xe/Makefile | 1 + 9 files changed, 581 insertions(+), 7 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_dmc_wl_debugfs.c create mode 100644 drivers/gpu/drm/i915/display/intel_dmc_wl_debugfs.h -- 2.48.0