All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Wambui Karuga <wambui.karugax@gmail.com>
Subject: Re: [Intel-gfx] [PATCH 05/13] drm/i915/dsi: use struct drm_device based logging
Date: Wed, 25 Mar 2020 09:45:16 +0100	[thread overview]
Message-ID: <20200325084516.GR2363188@phenom.ffwll.local> (raw)
In-Reply-To: <3bc29cddbba9dea57f8f843be2a6b5e1f7358b5c.1584714939.git.jani.nikula@intel.com>

On Fri, Mar 20, 2020 at 04:36:30PM +0200, Jani Nikula wrote:
> 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>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dsi.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c
> index a2a937109a5a..afa4e6817e8c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsi.c
> @@ -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");

Real old school drm printing, just to trace the function call :-)

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

>  
>  	if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
>  		return MODE_NO_DBLESCAN;
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-03-25  8:45 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20 14:36 [Intel-gfx] [PATCH 00/13] drm/i915: drm device based logging changes Jani Nikula
2020-03-20 14:36 ` [Intel-gfx] [PATCH 01/13] drm/i915/ddi: use struct drm_device based logging Jani Nikula
2020-03-25  8:36   ` Daniel Vetter
2020-03-20 14:36 ` [Intel-gfx] [PATCH 02/13] drm/i915/display_power: " Jani Nikula
2020-03-25  8:38   ` Daniel Vetter
2020-03-20 14:36 ` [Intel-gfx] [PATCH 03/13] drm/i915/dp_aux_backlight: " Jani Nikula
2020-03-25  8:39   ` Daniel Vetter
2020-03-20 14:36 ` [Intel-gfx] [PATCH 04/13] drm/i915/dp_mst: " Jani Nikula
2020-03-25  8:40   ` Daniel Vetter
2020-03-20 14:36 ` [Intel-gfx] [PATCH 05/13] drm/i915/dsi: " Jani Nikula
2020-03-25  8:45   ` Daniel Vetter [this message]
2020-03-20 14:36 ` [Intel-gfx] [PATCH 06/13] drm/i915/hdmi: " Jani Nikula
2020-03-25  8:43   ` Daniel Vetter
2020-03-25 17:55     ` Jani Nikula
2020-03-20 14:36 ` [Intel-gfx] [PATCH 07/13] drm/i915/dsi: " Jani Nikula
2020-03-25  8:51   ` Daniel Vetter
2020-03-25 17:53     ` Jani Nikula
2020-03-20 14:36 ` [Intel-gfx] [PATCH 08/13] drm/i915/connector: use MISSING_CASE instead of logging Jani Nikula
2020-03-25  8:52   ` Daniel Vetter
2020-03-20 14:36 ` [Intel-gfx] [PATCH 09/13] drm/i915/tv: use struct drm_device based logging Jani Nikula
2020-03-25  8:53   ` Daniel Vetter
2020-03-20 14:36 ` [Intel-gfx] [PATCH 10/13] drm/i915/display: clean up intel_PLL_is_valid() Jani Nikula
2020-03-25  8:56   ` Daniel Vetter
2020-03-25 17:57     ` Jani Nikula
2020-03-20 14:36 ` [Intel-gfx] [PATCH 11/13] drm/i915/display: use struct drm_device based logging Jani Nikula
2020-03-25  8:57   ` Daniel Vetter
2020-03-20 14:36 ` [Intel-gfx] [PATCH 12/13] drm/i915/psr: " Jani Nikula
2020-03-25  9:03   ` Daniel Vetter
2020-03-20 14:36 ` [Intel-gfx] [PATCH 13/13] drm/i915/wopcm: convert to drm device " Jani Nikula
2020-03-25  9:10   ` Daniel Vetter
2020-03-20 19:05 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: drm device based logging changes Patchwork
2020-03-20 19:29 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-03-21  1:36 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=20200325084516.GR2363188@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.