drm/i915: Convert a few more bland dmesg info to be device specific
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 Aug 2019 09:36:04 +0000 (10:36 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 Aug 2019 12:13:23 +0000 (13:13 +0100)
Looking around the GT initialisation, we have a few log messages we
think are interesting enough present to the user (such as the amount of L4
cache) and a few to inform them of the result of actions or conflicting
HW restrictions (i.e. quirks). These are device specific messages, so
use the dev family of printk.

v2: shave off a few bytes of .rodata!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190815093604.3618-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_stolen.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_pmu.c

index 696dea5ec7c67327804b4ca3cc7330e2948124a7..aa533b4ab5f546b06cf7e618d03256049f41a061 100644 (file)
@@ -363,12 +363,16 @@ int i915_gem_init_stolen(struct drm_i915_private *dev_priv)
        mutex_init(&dev_priv->mm.stolen_lock);
 
        if (intel_vgpu_active(dev_priv)) {
-               DRM_INFO("iGVT-g active, disabling use of stolen memory\n");
+               dev_notice(dev_priv->drm.dev,
+                          "%s, disabling use of stolen memory\n",
+                          "iGVT-g active");
                return 0;
        }
 
        if (intel_vtd_active() && INTEL_GEN(dev_priv) < 8) {
-               DRM_INFO("DMAR active, disabling use of stolen memory\n");
+               dev_notice(dev_priv->drm.dev,
+                          "%s, disabling use of stolen memory\n",
+                          "DMAR active");
                return 0;
        }
 
index 96bf70b48cf76646c049f790e5020a8fecfc7875..4ee12843171ca89831575222d554b509016e93ce 100644 (file)
@@ -1102,7 +1102,8 @@ static void edram_detect(struct drm_i915_private *dev_priv)
                dev_priv->edram_size_mb =
                        gen9_edram_size_mb(dev_priv, edram_cap);
 
-       DRM_INFO("Found %uMB of eDRAM\n", dev_priv->edram_size_mb);
+       dev_info(dev_priv->drm.dev,
+                "Found %uMB of eDRAM\n", dev_priv->edram_size_mb);
 }
 
 /**
index e07c1ae971d7310d2f882488cc518acacfb356de..fcf05c213b0ac560413e6ab67e1182bca2684295 100644 (file)
@@ -3104,7 +3104,8 @@ static int i915_gmch_probe(struct i915_ggtt *ggtt)
        ggtt->vm.vma_ops.clear_pages = clear_pages;
 
        if (unlikely(ggtt->do_idle_maps))
-               DRM_INFO("applying Ironlake quirks for intel_iommu\n");
+               dev_notice(dev_priv->drm.dev,
+                          "Applying Ironlake quirks for intel_iommu\n");
 
        return 0;
 }
@@ -3165,7 +3166,7 @@ int i915_ggtt_probe_hw(struct drm_i915_private *i915)
                return ret;
 
        if (intel_vtd_active())
-               DRM_INFO("VT-d active for gfx access\n");
+               dev_info(i915->drm.dev, "VT-d active for gfx access\n");
 
        return 0;
 }
index d4ef174f406a6f3fba867f99fcbf626678c0371e..0c1995c66dde3cbc5a3b7d721eab82f0f03c1e5f 100644 (file)
@@ -1766,12 +1766,12 @@ void i915_capture_error_state(struct drm_i915_private *i915,
 
        if (!warned &&
            ktime_get_real_seconds() - DRIVER_TIMESTAMP < DAY_AS_SECONDS(180)) {
-               DRM_INFO("GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.\n");
-               DRM_INFO("Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel\n");
-               DRM_INFO("drm/i915 developers can then reassign to the right component if it's not a kernel issue.\n");
-               DRM_INFO("The gpu crash dump is required to analyze gpu hangs, so please always attach it.\n");
-               DRM_INFO("GPU crash dump saved to /sys/class/drm/card%d/error\n",
-                        i915->drm.primary->index);
+               pr_info("GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.\n");
+               pr_info("Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel\n");
+               pr_info("drm/i915 developers can then reassign to the right component if it's not a kernel issue.\n");
+               pr_info("The GPU crash dump is required to analyze GPU hangs, so please always attach it.\n");
+               pr_info("GPU crash dump saved to /sys/class/drm/card%d/error\n",
+                       i915->drm.primary->index);
                warned = true;
        }
 }
index c7ee0ab180e88d1c01263025b5090046f5a95a24..8e251e719390fc7209931108373ce421a6d4bcc6 100644 (file)
@@ -1053,7 +1053,7 @@ void i915_pmu_register(struct drm_i915_private *i915)
        int ret;
 
        if (INTEL_GEN(i915) <= 2) {
-               DRM_INFO("PMU not supported for this GPU.");
+               dev_info(i915->drm.dev, "PMU not supported for this GPU.");
                return;
        }