drm/i915/tv: use struct drm_device based logging
authorJani Nikula <jani.nikula@intel.com>
Fri, 20 Mar 2020 14:36:34 +0000 (16:36 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 25 Mar 2020 17:47:41 +0000 (19:47 +0200)
Convert all the DRM_* logging macros to the struct drm_device based
macros to provide device specific logging.

No functional changes.

Generated using the following semantic patch, originally written by
Wambui Karuga <wambui.karugax@gmail.com>, with manual fixups on top:

@@
identifier fn, T;
@@

fn(...,struct drm_i915_private *T,...) {
<+...
(
-DRM_INFO(
+drm_info(&T->drm,
...)
|
-DRM_NOTE(
+drm_notice(&T->drm,
...)
|
-DRM_ERROR(
+drm_err(&T->drm,
...)
|
-DRM_WARN(
+drm_warn(&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_NOTE(
+drm_notice(&T->drm,
...)
|
-DRM_ERROR(
+drm_err(&T->drm,
...)
|
-DRM_WARN(
+drm_warn(&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,
...)
)
...+>
}

Cc: Wambui Karuga <wambui.karugax@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e08dbd1933e1dbbd8e9f1954f5b0a9db946c4e7d.1584714939.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_tv.c

index d2e3a3a323e9c05e1fd1080d2cff80d194246acc..5de39cfce054c2abca617d23593abfad94b4e3f6 100644 (file)
@@ -1698,13 +1698,13 @@ intel_tv_detect(struct drm_connector *connector,
                struct drm_modeset_acquire_ctx *ctx,
                bool force)
 {
+       struct drm_i915_private *i915 = to_i915(connector->dev);
        struct intel_tv *intel_tv = intel_attached_tv(to_intel_connector(connector));
        enum drm_connector_status status;
        int type;
 
-       DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force=%d\n",
-                     connector->base.id, connector->name,
-                     force);
+       drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] force=%d\n",
+                   connector->base.id, connector->name, force);
 
        if (force) {
                struct intel_load_detect_pipe tmp;