]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/dsi: use struct drm_device based logging
authorJani Nikula <jani.nikula@intel.com>
Fri, 20 Mar 2020 14:36:30 +0000 (16:36 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 25 Mar 2020 17:45:49 +0000 (19:45 +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/3bc29cddbba9dea57f8f843be2a6b5e1f7358b5c.1584714939.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_dsi.c

index a2a937109a5ad113e18b8363c1dc5d9807114716..afa4e6817e8c7be4fe0c96305ddee4a60005f722 100644 (file)
@@ -31,20 +31,21 @@ int intel_dsi_tlpx_ns(const struct intel_dsi *intel_dsi)
 
 int intel_dsi_get_modes(struct drm_connector *connector)
 {
+       struct drm_i915_private *i915 = to_i915(connector->dev);
        struct intel_connector *intel_connector = to_intel_connector(connector);
        struct drm_display_mode *mode;
 
-       DRM_DEBUG_KMS("\n");
+       drm_dbg_kms(&i915->drm, "\n");
 
        if (!intel_connector->panel.fixed_mode) {
-               DRM_DEBUG_KMS("no fixed mode\n");
+               drm_dbg_kms(&i915->drm, "no fixed mode\n");
                return 0;
        }
 
        mode = drm_mode_duplicate(connector->dev,
                                  intel_connector->panel.fixed_mode);
        if (!mode) {
-               DRM_DEBUG_KMS("drm_mode_duplicate failed\n");
+               drm_dbg_kms(&i915->drm, "drm_mode_duplicate failed\n");
                return 0;
        }
 
@@ -60,7 +61,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector,
        const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
        int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
 
-       DRM_DEBUG_KMS("\n");
+       drm_dbg_kms(&dev_priv->drm, "\n");
 
        if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
                return MODE_NO_DBLESCAN;