OSDN Git Service

drm/i915: Make i915_engine_info pretty printer to standalone
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 Oct 2017 11:02:57 +0000 (12:02 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 Oct 2017 16:07:28 +0000 (17:07 +0100)
commitf636edb214a5ffdc533d5c7198a66957322c1b40
tree535f2deb77d61fdc69a3bd5180b053fdcadbd03b
parentbef27bdb6cfbc8c74c776f9455d4d3a4a76a4872
drm/i915: Make i915_engine_info pretty printer to standalone

We can use drm_printer to hide the differences between printk and
seq_printf, and so make the i915_engine_info pretty printer able to be
called from different contexts and not just debugfs. For instance, I
want to use the pretty printer to debug kselftests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171009110301.21705-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/intel_engine_cs.c
drivers/gpu/drm/i915/intel_ringbuffer.h