drm/i915: conversion to new logging macros in i915/intel_device_info.c
authorWambui Karuga <wambui.karugax@gmail.com>
Thu, 9 Jan 2020 09:06:44 +0000 (12:06 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 17 Jan 2020 15:41:33 +0000 (17:41 +0200)
This replaces the printk and struct device based logging macros with the
new struct drm_device style based logging macros i915/intel_device_info.c.

Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e404429ff2a5e5080867f577beccd7b578a671cd.1578560355.git.wambui.karugax@gmail.com
drivers/gpu/drm/i915/intel_device_info.c

index 6670a0763be2e77cfeb965b6b3ebd0b62428bddc..fcdacd6d4aa5531d0b0767b91501156d48e429b3 100644 (file)
@@ -974,10 +974,11 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
                    sfuse_strap & SFUSE_STRAP_DISPLAY_DISABLED ||
                    (HAS_PCH_CPT(dev_priv) &&
                     !(sfuse_strap & SFUSE_STRAP_FUSE_LOCK))) {
-                       DRM_INFO("Display fused off, disabling\n");
+                       drm_info(&dev_priv->drm,
+                                "Display fused off, disabling\n");
                        info->pipe_mask = 0;
                } else if (fuse_strap & IVB_PIPE_C_DISABLE) {
-                       DRM_INFO("PipeC fused off\n");
+                       drm_info(&dev_priv->drm, "PipeC fused off\n");
                        info->pipe_mask &= ~BIT(PIPE_C);
                }
        } else if (HAS_DISPLAY(dev_priv) && INTEL_GEN(dev_priv) >= 9) {
@@ -1000,8 +1001,9 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
                 * in the mask.
                 */
                if (enabled_mask == 0 || !is_power_of_2(enabled_mask + 1))
-                       DRM_ERROR("invalid pipe fuse configuration: enabled_mask=0x%x\n",
-                                 enabled_mask);
+                       drm_err(&dev_priv->drm,
+                               "invalid pipe fuse configuration: enabled_mask=0x%x\n",
+                               enabled_mask);
                else
                        info->pipe_mask = enabled_mask;
 
@@ -1036,7 +1038,8 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
                gen12_sseu_info_init(dev_priv);
 
        if (IS_GEN(dev_priv, 6) && intel_vtd_active()) {
-               DRM_INFO("Disabling ppGTT for VT-d support\n");
+               drm_info(&dev_priv->drm,
+                        "Disabling ppGTT for VT-d support\n");
                info->ppgtt_type = INTEL_PPGTT_NONE;
        }
 
@@ -1084,7 +1087,7 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)
 
                if (!(BIT(i) & vdbox_mask)) {
                        info->engine_mask &= ~BIT(_VCS(i));
-                       DRM_DEBUG_DRIVER("vcs%u fused off\n", i);
+                       drm_dbg(&dev_priv->drm, "vcs%u fused off\n", i);
                        continue;
                }
 
@@ -1096,8 +1099,8 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)
                if (INTEL_GEN(dev_priv) >= 12 || logical_vdbox++ % 2 == 0)
                        RUNTIME_INFO(dev_priv)->vdbox_sfc_access |= BIT(i);
        }
-       DRM_DEBUG_DRIVER("vdbox enable: %04x, instances: %04lx\n",
-                        vdbox_mask, VDBOX_MASK(dev_priv));
+       drm_dbg(&dev_priv->drm, "vdbox enable: %04x, instances: %04lx\n",
+               vdbox_mask, VDBOX_MASK(dev_priv));
        GEM_BUG_ON(vdbox_mask != VDBOX_MASK(dev_priv));
 
        for (i = 0; i < I915_MAX_VECS; i++) {
@@ -1108,10 +1111,10 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv)
 
                if (!(BIT(i) & vebox_mask)) {
                        info->engine_mask &= ~BIT(_VECS(i));
-                       DRM_DEBUG_DRIVER("vecs%u fused off\n", i);
+                       drm_dbg(&dev_priv->drm, "vecs%u fused off\n", i);
                }
        }
-       DRM_DEBUG_DRIVER("vebox enable: %04x, instances: %04lx\n",
-                        vebox_mask, VEBOX_MASK(dev_priv));
+       drm_dbg(&dev_priv->drm, "vebox enable: %04x, instances: %04lx\n",
+               vebox_mask, VEBOX_MASK(dev_priv));
        GEM_BUG_ON(vebox_mask != VEBOX_MASK(dev_priv));
 }