drm/i915/debugfs: Get rid of single use macros.

No good reason for these indirection cases.

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230120110658.1083757-1-rodrigo.vivi@intel.com
This commit is contained in:
Rodrigo Vivi 2023-01-20 06:06:58 -05:00 committed by Junxiao Chang
parent 1bb55e20c4
commit c5876dfa15
1 changed files with 2 additions and 5 deletions

View File

@ -649,15 +649,13 @@ i915_drop_caches_get(void *data, u64 *val)
return 0; return 0;
} }
#define I915_IDLE_ENGINES_TIMEOUT (200) /* in ms */
static int static int
gt_drop_caches(struct intel_gt *gt, u64 val) gt_drop_caches(struct intel_gt *gt, u64 val)
{ {
int ret; int ret;
if (val & DROP_RESET_ACTIVE && if (val & DROP_RESET_ACTIVE &&
wait_for(intel_engines_are_idle(gt), I915_IDLE_ENGINES_TIMEOUT)) wait_for(intel_engines_are_idle(gt), 200))
intel_gt_set_wedged(gt); intel_gt_set_wedged(gt);
if (val & DROP_RETIRE) if (val & DROP_RETIRE)
@ -765,7 +763,6 @@ static const struct drm_info_list i915_debugfs_list[] = {
{"i915_sseu_status", i915_sseu_status, 0}, {"i915_sseu_status", i915_sseu_status, 0},
{"i915_rps_boost_info", i915_rps_boost_info, 0}, {"i915_rps_boost_info", i915_rps_boost_info, 0},
}; };
#define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list)
static const struct i915_debugfs_files { static const struct i915_debugfs_files {
const char *name; const char *name;
@ -798,6 +795,6 @@ void i915_debugfs_register(struct drm_i915_private *dev_priv)
} }
drm_debugfs_create_files(i915_debugfs_list, drm_debugfs_create_files(i915_debugfs_list,
I915_DEBUGFS_ENTRIES, ARRAY_SIZE(i915_debugfs_list),
minor->debugfs_root, minor); minor->debugfs_root, minor);
} }