drm/i915: Capture module parameters for the GPU error state
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Feb 2017 21:36:07 +0000 (21:36 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Feb 2017 22:37:34 +0000 (22:37 +0000)
commit642c8a72533f26b1614d9f11361947f368fb3e57
tree7930cd1901dc874b205eb33faabef98408b5be6a
parent1a2010ca52f951b7a9e0cadb92d4bbcee643194c
drm/i915: Capture module parameters for the GPU error state

They include useful material such as what mode the VM address space is
running in, what submission mode, extra quirks, etc.

v2: Undef the right macro, use type specific pretty printers
v3: Use strcmp(TYPENAME) rather than creating per-type pretty printers
v4: Use __always_inline to force GCC to eliminate the calls to strcmp and
generate the right call to seq_printf for each parameter.
v5: With the strcmp elimination, we can now use BUILD_BUG to ensure
there are no unhandled types, also use __builtin_strcmp to make it look
even more magic.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Acked-by: Mika Kuoppala <mika.kuoppala@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170206213608.31328-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gpu_error.c