diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2017-12-19 11:43:46 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-12-19 15:07:08 +0000 |
commit | acfb9973a0d1e5dd14c40464d9a20945cd2ac02e (patch) | |
tree | f434c874ebe5433e8ebd858269c117f5353ef598 /drivers/gpu/drm/i915/i915_params.h | |
parent | eb10ed9a9e1ecacafab5535c86b62061b39360e5 (diff) | |
download | linux-stable-acfb9973a0d1e5dd14c40464d9a20945cd2ac02e.tar.gz linux-stable-acfb9973a0d1e5dd14c40464d9a20945cd2ac02e.tar.bz2 linux-stable-acfb9973a0d1e5dd14c40464d9a20945cd2ac02e.zip |
drm/i915: Add pretty printer for modparams
We dump modparams in few places (debugfs, gpu_error) using different
functions. Lets add reusable function to avoid code duplication.
add/remove: 1/0 grow/shrink: 0/2 up/down: 1096/-2339 (-1243)
Function old new delta
i915_params_dump - 1096 +1096
i915_capabilities 1353 185 -1168
i915_error_state_to_str 5507 4336 -1171
Total: Before=1285716, After=1284473, chg -0.10%
v2: use forward decl rather than include (Chris)
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171219114346.26308-3-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_params.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_params.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h index 792ce26d7449..c96360398072 100644 --- a/drivers/gpu/drm/i915/i915_params.h +++ b/drivers/gpu/drm/i915/i915_params.h @@ -28,6 +28,8 @@ #include <linux/bitops.h> #include <linux/cache.h> /* for __read_mostly */ +struct drm_printer; + #define ENABLE_GUC_SUBMISSION BIT(0) #define ENABLE_GUC_LOAD_HUC BIT(1) @@ -77,5 +79,7 @@ struct i915_params { extern struct i915_params i915_modparams __read_mostly; +void i915_params_dump(const struct i915_params *params, struct drm_printer *p); + #endif |