Commit 023a125d authored by Chris Wilson's avatar Chris Wilson

drm/i915: Squeeze iommu status into debugfs/i915_capabilities

There's no easy way of checking whether iommu is enabled for the GPU
(you can grep dmesg if you know the device, or you can grep
i915_gpu_info if that's available). We do have a central
i915_capabilities with the intent of listing such pertinent information,
so add the iommu status.
Suggested-by: default avatarMartin Peres <martin.peres@linux.intel.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Martin Peres <martin.peres@linux.intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Acked-by: default avatarMartin Peres <martin.peres@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190911114655.9254-1-chris@chris-wilson.co.uk
parent 7cb8468b
...@@ -61,11 +61,18 @@ static int i915_capabilities(struct seq_file *m, void *data) ...@@ -61,11 +61,18 @@ static int i915_capabilities(struct seq_file *m, void *data)
struct drm_i915_private *dev_priv = node_to_i915(m->private); struct drm_i915_private *dev_priv = node_to_i915(m->private);
const struct intel_device_info *info = INTEL_INFO(dev_priv); const struct intel_device_info *info = INTEL_INFO(dev_priv);
struct drm_printer p = drm_seq_file_printer(m); struct drm_printer p = drm_seq_file_printer(m);
const char *msg;
seq_printf(m, "gen: %d\n", INTEL_GEN(dev_priv)); seq_printf(m, "gen: %d\n", INTEL_GEN(dev_priv));
seq_printf(m, "platform: %s\n", intel_platform_name(info->platform)); seq_printf(m, "platform: %s\n", intel_platform_name(info->platform));
seq_printf(m, "pch: %d\n", INTEL_PCH_TYPE(dev_priv)); seq_printf(m, "pch: %d\n", INTEL_PCH_TYPE(dev_priv));
msg = "n/a";
#ifdef CONFIG_INTEL_IOMMU
msg = enableddisabled(intel_iommu_gfx_mapped);
#endif
seq_printf(m, "iommu: %s\n", msg);
intel_device_info_dump_flags(info, &p); intel_device_info_dump_flags(info, &p);
intel_device_info_dump_runtime(RUNTIME_INFO(dev_priv), &p); intel_device_info_dump_runtime(RUNTIME_INFO(dev_priv), &p);
intel_driver_caps_print(&dev_priv->caps, &p); intel_driver_caps_print(&dev_priv->caps, &p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment