diff options
author | Wambui Karuga <wambui.karugax@gmail.com> | 2020-01-31 12:34:12 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2020-02-04 12:29:27 +0300 |
commit | 00376ccfb2a457fcd7041e2d5740faa8a81ab8cb (patch) | |
tree | 8c1454bff3aca708cac7ff52a5cf804c56d17ad0 /drivers/gpu/drm/i915/i915_perf.c | |
parent | e9318906ad0b2b42123f44e00c0e13cb1a5f62f5 (diff) | |
download | linux-00376ccfb2a457fcd7041e2d5740faa8a81ab8cb.tar.xz |
drm/i915: conversion to drm_device logging macros when drm_i915_private is present.
Converts various instances of the printk drm logging macros to the
struct drm_device based logging macros in the drm/i915 folder using the
following coccinelle script that transforms based on the existence of
the struct drm_i915_private device pointer:
@@
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_KMS(
+drm_dbg_kms(&T->drm,
...)
|
-DRM_DEBUG_DRIVER(
+drm_dbg(&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_DRIVER(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_KMS(
+drm_dbg_kms(&T->drm,
...)
|
-DRM_DEBUG_ATOMIC(
+drm_dbg_atomic(&T->drm,
...)
)
...+>
}
Checkpatch warnings were fixed manually.
Instances of the DRM_DEBUG macro were not converted due to lack of a
consensus of an analogous struct drm_device based macro.
References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
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/20200131093416.28431-2-wambui.karugax@gmail.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_perf.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_perf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index 535a12520dba..b5249ee5bda6 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915/i915_perf.c @@ -1598,7 +1598,7 @@ static int alloc_oa_buffer(struct i915_perf_stream *stream) bo = i915_gem_object_create_shmem(stream->perf->i915, OA_BUFFER_SIZE); if (IS_ERR(bo)) { - DRM_ERROR("Failed to allocate OA buffer\n"); + drm_err(&i915->drm, "Failed to allocate OA buffer\n"); return PTR_ERR(bo); } @@ -1680,7 +1680,8 @@ static int alloc_noa_wait(struct i915_perf_stream *stream) bo = i915_gem_object_create_internal(i915, 4096); if (IS_ERR(bo)) { - DRM_ERROR("Failed to allocate NOA wait batchbuffer\n"); + drm_err(&i915->drm, + "Failed to allocate NOA wait batchbuffer\n"); return PTR_ERR(bo); } |