]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/fifo_underrun: convert to drm_device based logging.
authorWambui Karuga <wambui.karugax@gmail.com>
Tue, 10 Mar 2020 08:52:43 +0000 (10:52 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 11 Mar 2020 10:20:43 +0000 (12:20 +0200)
Convert various instances of the printk based drm logging macros to the
struct drm_device based logging macros in
i915/display/intel_fifo_underrun.c.
This was done using the following coccinelle script:
@@
identifier fn, T;
@@

fn(...,struct drm_i915_private *T,...) {
<+...
(
-DRM_INFO(
+drm_info(&T->drm,
...)
|
-DRM_ERROR(
+drm_err(&T->drm,
...)
|
-DRM_WARN(
+drm_warn(&T->drm,
...)
|
-DRM_DEBUG(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_DRIVER(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_KMS(
+drm_dbg_kms(&T->drm,
...)
|
-DRM_DEBUG_ATOMIC(
+drm_dbg_atomic(&T->drm,
...)
)
...+>
}

@@
identifier fn, T;
@@

fn(...) {
...
struct drm_i915_private *T = ...;
<+...
(
-DRM_INFO(
+drm_info(&T->drm,
...)
|
-DRM_ERROR(
+drm_err(&T->drm,
...)
|
-DRM_WARN(
+drm_warn(&T->drm,
...)
|
-DRM_DEBUG(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_KMS(
+drm_dbg_kms(&T->drm,
...)
|
-DRM_DEBUG_DRIVER(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_ATOMIC(
+drm_dbg_atomic(&T->drm,
...)
)
...+>
}

New checkpatch warnings were addressed manually.

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/3e8e74494c8aa662ab3fb4de1dac63fedef35c47.1583766715.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_fifo_underrun.c

index 470b3b0b9bdbdc1c74f5e0a2fe2b493b107324f5..813a4f7033e1c108de91ccb57b40108976d4e24a 100644 (file)
@@ -103,7 +103,7 @@ static void i9xx_check_fifo_underruns(struct intel_crtc *crtc)
        intel_de_posting_read(dev_priv, reg);
 
        trace_intel_cpu_fifo_underrun(dev_priv, crtc->pipe);
-       DRM_ERROR("pipe %c underrun\n", pipe_name(crtc->pipe));
+       drm_err(&dev_priv->drm, "pipe %c underrun\n", pipe_name(crtc->pipe));
 }
 
 static void i9xx_set_fifo_underrun_reporting(struct drm_device *dev,
@@ -123,7 +123,8 @@ static void i9xx_set_fifo_underrun_reporting(struct drm_device *dev,
                intel_de_posting_read(dev_priv, reg);
        } else {
                if (old && intel_de_read(dev_priv, reg) & PIPE_FIFO_UNDERRUN_STATUS)
-                       DRM_ERROR("pipe %c underrun\n", pipe_name(pipe));
+                       drm_err(&dev_priv->drm, "pipe %c underrun\n",
+                               pipe_name(pipe));
        }
 }
 
@@ -155,7 +156,7 @@ static void ivb_check_fifo_underruns(struct intel_crtc *crtc)
        intel_de_posting_read(dev_priv, GEN7_ERR_INT);
 
        trace_intel_cpu_fifo_underrun(dev_priv, pipe);
-       DRM_ERROR("fifo underrun on pipe %c\n", pipe_name(pipe));
+       drm_err(&dev_priv->drm, "fifo underrun on pipe %c\n", pipe_name(pipe));
 }
 
 static void ivb_set_fifo_underrun_reporting(struct drm_device *dev,
@@ -176,8 +177,9 @@ static void ivb_set_fifo_underrun_reporting(struct drm_device *dev,
 
                if (old &&
                    intel_de_read(dev_priv, GEN7_ERR_INT) & ERR_INT_FIFO_UNDERRUN(pipe)) {
-                       DRM_ERROR("uncleared fifo underrun on pipe %c\n",
-                                 pipe_name(pipe));
+                       drm_err(&dev_priv->drm,
+                               "uncleared fifo underrun on pipe %c\n",
+                               pipe_name(pipe));
                }
        }
 }
@@ -223,8 +225,8 @@ static void cpt_check_pch_fifo_underruns(struct intel_crtc *crtc)
        intel_de_posting_read(dev_priv, SERR_INT);
 
        trace_intel_pch_fifo_underrun(dev_priv, pch_transcoder);
-       DRM_ERROR("pch fifo underrun on pch transcoder %c\n",
-                 pipe_name(pch_transcoder));
+       drm_err(&dev_priv->drm, "pch fifo underrun on pch transcoder %c\n",
+               pipe_name(pch_transcoder));
 }
 
 static void cpt_set_fifo_underrun_reporting(struct drm_device *dev,
@@ -246,8 +248,9 @@ static void cpt_set_fifo_underrun_reporting(struct drm_device *dev,
 
                if (old && intel_de_read(dev_priv, SERR_INT) &
                    SERR_INT_TRANS_FIFO_UNDERRUN(pch_transcoder)) {
-                       DRM_ERROR("uncleared pch fifo underrun on pch transcoder %c\n",
-                                 pipe_name(pch_transcoder));
+                       drm_err(&dev_priv->drm,
+                               "uncleared pch fifo underrun on pch transcoder %c\n",
+                               pipe_name(pch_transcoder));
                }
        }
 }
@@ -381,8 +384,8 @@ void intel_cpu_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
 
        if (intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false)) {
                trace_intel_cpu_fifo_underrun(dev_priv, pipe);
-               DRM_ERROR("CPU pipe %c FIFO underrun\n",
-                         pipe_name(pipe));
+               drm_err(&dev_priv->drm, "CPU pipe %c FIFO underrun\n",
+                       pipe_name(pipe));
        }
 
        intel_fbc_handle_fifo_underrun_irq(dev_priv);
@@ -403,8 +406,8 @@ void intel_pch_fifo_underrun_irq_handler(struct drm_i915_private *dev_priv,
        if (intel_set_pch_fifo_underrun_reporting(dev_priv, pch_transcoder,
                                                  false)) {
                trace_intel_pch_fifo_underrun(dev_priv, pch_transcoder);
-               DRM_ERROR("PCH transcoder %c FIFO underrun\n",
-                         pipe_name(pch_transcoder));
+               drm_err(&dev_priv->drm, "PCH transcoder %c FIFO underrun\n",
+                       pipe_name(pch_transcoder));
        }
 }