drm/i915: Add pretty printer for modparams
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 19 Dec 2017 11:43:46 +0000 (11:43 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 19 Dec 2017 15:07:08 +0000 (15:07 +0000)
commitacfb9973a0d1e5dd14c40464d9a20945cd2ac02e
treef434c874ebe5433e8ebd858269c117f5353ef598
parenteb10ed9a9e1ecacafab5535c86b62061b39360e5
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
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_params.c
drivers/gpu/drm/i915/i915_params.h