Quoting Martin Peres (2019-09-11 13:19:06) > > > On 11/09/2019 14:46, Chris Wilson wrote: > > 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: Martin Peres <martin.peres@xxxxxxxxxxxxxxx> > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > > Cc: Martin Peres <martin.peres@xxxxxxxxxxxxxxx> > > Cc: Tomi Sarvela <tomi.p.sarvela@xxxxxxxxx> > > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> > > --- > > drivers/gpu/drm/i915/i915_debugfs.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > > index 708855e051b5..e5835337f022 100644 > > --- a/drivers/gpu/drm/i915/i915_debugfs.c > > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > > @@ -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); > > const struct intel_device_info *info = INTEL_INFO(dev_priv); > > 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, "platform: %s\n", intel_platform_name(info->platform)); > > seq_printf(m, "pch: %d\n", INTEL_PCH_TYPE(dev_priv)); > > > > + msg = "n/a"; > > Here, "n/a" really means "kernel not compiled with IOMMU support". > Should we find a wording better explaining this to users? Or are we > going to tell users to check their dmesg for IOMMU messages and if there > are none, it means either the kernel has not been compiled with support > for it, or an option needs to be enabled in the bios, or the platform > lacks support? Users? This is debugfs, we should not be having users! :) So whatever is convenient, just a string is slightly nicer for humans than having -1, 0, 1. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx