From: Jani Nikula <jani.nikula@linux.intel.com>
To: Wambui Karuga <wambui.karugax@gmail.com>,
joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com,
airlied@linux.ie, daniel@ffwll.ch
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915/perf: conversion to struct drm_device based logging macros.
Date: Fri, 21 Feb 2020 11:36:12 +0200 [thread overview]
Message-ID: <87blpsz3hv.fsf@intel.com> (raw)
In-Reply-To: <20200218173936.19664-1-wambui.karugax@gmail.com>
On Tue, 18 Feb 2020, Wambui Karuga <wambui.karugax@gmail.com> wrote:
> Manual conversion of instances of printk based drm logging macros to the
> struct drm_device based logging macros in i915/i915_perf.c.
> Also involves extraction of the struct drm_i915_private device from
> various intel types for use in the macros.
>
> Instances of the DRM_DEBUG printk macro were not converted due to the
> lack of an analogous struct drm_device based logging macro.
>
> v2: remove instances of DRM_DEBUG that were converted.
>
> References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
Thanks, pushed to drm-intel-next-queued.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/i915_perf.c | 27 +++++++++++++++++----------
> 1 file changed, 17 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index b5249ee5bda6..e34c79df6ebc 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -555,8 +555,9 @@ static bool oa_buffer_check_unlocked(struct i915_perf_stream *stream)
> aging_tail = hw_tail;
> stream->oa_buffer.aging_timestamp = now;
> } else {
> - DRM_ERROR("Ignoring spurious out of range OA buffer tail pointer = %x\n",
> - hw_tail);
> + drm_err(&stream->perf->i915->drm,
> + "Ignoring spurious out of range OA buffer tail pointer = %x\n",
> + hw_tail);
> }
> }
>
> @@ -745,7 +746,8 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
> */
> if (drm_WARN_ON(&uncore->i915->drm,
> (OA_BUFFER_SIZE - head) < report_size)) {
> - DRM_ERROR("Spurious OA head ptr: non-integral report offset\n");
> + drm_err(&uncore->i915->drm,
> + "Spurious OA head ptr: non-integral report offset\n");
> break;
> }
>
> @@ -1041,7 +1043,8 @@ static int gen7_append_oa_reports(struct i915_perf_stream *stream,
> */
> if (drm_WARN_ON(&uncore->i915->drm,
> (OA_BUFFER_SIZE - head) < report_size)) {
> - DRM_ERROR("Spurious OA head ptr: non-integral report offset\n");
> + drm_err(&uncore->i915->drm,
> + "Spurious OA head ptr: non-integral report offset\n");
> break;
> }
>
> @@ -1339,9 +1342,10 @@ static int oa_get_render_ctx_id(struct i915_perf_stream *stream)
>
> ce->tag = stream->specific_ctx_id;
>
> - DRM_DEBUG_DRIVER("filtering on ctx_id=0x%x ctx_id_mask=0x%x\n",
> - stream->specific_ctx_id,
> - stream->specific_ctx_id_mask);
> + drm_dbg(&stream->perf->i915->drm,
> + "filtering on ctx_id=0x%x ctx_id_mask=0x%x\n",
> + stream->specific_ctx_id,
> + stream->specific_ctx_id_mask);
>
> return 0;
> }
> @@ -2657,7 +2661,8 @@ static void gen7_oa_disable(struct i915_perf_stream *stream)
> if (intel_wait_for_register(uncore,
> GEN7_OACONTROL, GEN7_OACONTROL_ENABLE, 0,
> 50))
> - DRM_ERROR("wait for OA to be disabled timed out\n");
> + drm_err(&stream->perf->i915->drm,
> + "wait for OA to be disabled timed out\n");
> }
>
> static void gen8_oa_disable(struct i915_perf_stream *stream)
> @@ -2668,7 +2673,8 @@ static void gen8_oa_disable(struct i915_perf_stream *stream)
> if (intel_wait_for_register(uncore,
> GEN8_OACONTROL, GEN8_OA_COUNTER_ENABLE, 0,
> 50))
> - DRM_ERROR("wait for OA to be disabled timed out\n");
> + drm_err(&stream->perf->i915->drm,
> + "wait for OA to be disabled timed out\n");
> }
>
> static void gen12_oa_disable(struct i915_perf_stream *stream)
> @@ -2680,7 +2686,8 @@ static void gen12_oa_disable(struct i915_perf_stream *stream)
> GEN12_OAG_OACONTROL,
> GEN12_OAG_OACONTROL_OA_COUNTER_ENABLE, 0,
> 50))
> - DRM_ERROR("wait for OA to be disabled timed out\n");
> + drm_err(&stream->perf->i915->drm,
> + "wait for OA to be disabled timed out\n");
> }
>
> /**
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2020-02-21 9:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 17:39 [Intel-gfx] [PATCH v2] drm/i915/perf: conversion to struct drm_device based logging macros Wambui Karuga
2020-02-19 0:59 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-02-19 1:22 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2020-02-19 10:30 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/perf: conversion to struct drm_device based logging macros. (rev2) Patchwork
2020-02-19 11:04 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-02-20 23:41 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-02-21 9:36 ` Jani Nikula [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87blpsz3hv.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=wambui.karugax@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox