drm/i915: Add pretty printer for device info flags
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 19 Dec 2017 11:43:44 +0000 (11:43 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 19 Dec 2017 15:07:05 +0000 (15:07 +0000)
commita8c9b8496954e36fb1be205e1287f020a2923b4d
treea79723304f0a20e942aabb123b2af616a0673c78
parent04bf68bb04e25bb02432b483f69d8cdf1268382d
drm/i915: Add pretty printer for device info flags

We dump device flags in few places (init_early, debugfs, gpu_error)
using different functions. Lets add reusable function to avoid
code duplication.

add/remove: 1/0 grow/shrink: 0/3 up/down: 1296/-3572 (-2276)
Function                                     old     new   delta
intel_device_info_dump_flags                   -    1296   +1296
i915_capabilities                           2435    1353   -1082
i915_error_state_to_str                     6642    5507   -1135
intel_device_info_dump                      1507     152   -1355
Total: Before=1287992, After=1285716, chg -0.18%

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-1-michal.wajdeczko@intel.com
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/intel_device_info.c