public inbox for linux-arm-msm@vger.kernel.org
 help / color / mirror / Atom feed
From: ryadav-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
To: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org
Subject: Re: [DPU PATCH 04/19] drm/msm: dpu_rm: Replace DPU_EVT with tracepoints
Date: Tue, 26 Jun 2018 16:00:21 +0530	[thread overview]
Message-ID: <959a1d0ad0f72997ee24f7d4cd7025f6@codeaurora.org> (raw)
In-Reply-To: <20180620204841.56354-5-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>

On 2018-06-21 02:18, Sean Paul wrote:
> This patch converts all DPU_EVTs in dpu_rm with either a DRM_* log
> message or a linux tracepoint.
> 
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Rajesh Yadav <ryadav@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c    | 65 ++++++++++-------------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 49 +++++++++++++++++
>  2 files changed, 78 insertions(+), 36 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> index eff316bb2134..13c0a36d4ef9 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
> @@ -20,6 +20,7 @@
>  #include "dpu_hw_pingpong.h"
>  #include "dpu_hw_intf.h"
>  #include "dpu_encoder.h"
> +#include "dpu_trace.h"
> 
>  #define RESERVED_BY_OTHER(h, r) \
>  	((h)->rsvp && ((h)->rsvp->enc_id != (r)->enc_id))
> @@ -121,9 +122,8 @@ static void _dpu_rm_print_rsvps(
>  	DPU_DEBUG("%d\n", stage);
> 
>  	list_for_each_entry(rsvp, &rm->rsvps, list) {
> -		DPU_DEBUG("%d rsvp[s%ue%u] topology %d\n", stage, rsvp->seq,
> -				rsvp->enc_id, rsvp->topology);
> -		DPU_EVT32(stage, rsvp->seq, rsvp->enc_id, rsvp->topology);
> +		DRM_DEBUG_KMS("%d rsvp[s%ue%u] topology %d\n", stage, rsvp->seq,
> +			      rsvp->enc_id, rsvp->topology);
>  	}
> 
>  	for (type = 0; type < DPU_HW_BLK_MAX; type++) {
> @@ -131,14 +131,7 @@ static void _dpu_rm_print_rsvps(
>  			if (!blk->rsvp && !blk->rsvp_nxt)
>  				continue;
> 
> -			DPU_DEBUG("%d rsvp[s%ue%u->s%ue%u] %d %d\n", stage,
> -				(blk->rsvp) ? blk->rsvp->seq : 0,
> -				(blk->rsvp) ? blk->rsvp->enc_id : 0,
> -				(blk->rsvp_nxt) ? blk->rsvp_nxt->seq : 0,
> -				(blk->rsvp_nxt) ? blk->rsvp_nxt->enc_id : 0,
> -				blk->type, blk->id);
> -
> -			DPU_EVT32(stage,
> +			DRM_DEBUG_KMS("%d rsvp[s%ue%u->s%ue%u] %d %d\n", stage,
>  				(blk->rsvp) ? blk->rsvp->seq : 0,
>  				(blk->rsvp) ? blk->rsvp->enc_id : 0,
>  				(blk->rsvp_nxt) ? blk->rsvp_nxt->seq : 0,
> @@ -597,7 +590,8 @@ static int _dpu_rm_reserve_lms(
>  		lm[i]->rsvp_nxt = rsvp;
>  		pp[i]->rsvp_nxt = rsvp;
> 
> -		DPU_EVT32(lm[i]->type, rsvp->enc_id, lm[i]->id, pp[i]->id);
> +		trace_dpu_rm_reserve_lms(lm[i]->id, lm[i]->type, rsvp->enc_id,
> +					 pp[i]->id);
>  	}
> 
>  	return rc;
> @@ -642,7 +636,8 @@ static int _dpu_rm_reserve_ctls(
> 
>  	for (i = 0; i < ARRAY_SIZE(ctls) && i < top->num_ctl; i++) {
>  		ctls[i]->rsvp_nxt = rsvp;
> -		DPU_EVT32(ctls[i]->type, rsvp->enc_id, ctls[i]->id);
> +		trace_dpu_rm_reserve_ctls(ctls[i]->id, ctls[i]->type,
> +					  rsvp->enc_id);
>  	}
> 
>  	return 0;
> @@ -656,6 +651,8 @@ static int _dpu_rm_reserve_cdm(
>  {
>  	struct dpu_rm_hw_iter iter;
> 
> +	DRM_DEBUG_KMS("type %d id %d\n", type, id);
> +
>  	dpu_rm_init_hw_iter(&iter, 0, DPU_HW_BLK_CDM);
>  	while (_dpu_rm_get_hw_locked(rm, &iter)) {
>  		const struct dpu_hw_cdm *cdm = to_dpu_hw_cdm(iter.blk->hw);
> @@ -668,14 +665,16 @@ static int _dpu_rm_reserve_cdm(
>  		if (type == DPU_HW_BLK_INTF && id != INTF_MAX)
>  			match = test_bit(id, &caps->intf_connect);
> 
> -		DPU_DEBUG("type %d id %d, cdm intfs %lu match %d\n",
> -				type, id, caps->intf_connect, match);
> +		DRM_DEBUG_KMS("iter: type:%d id:%d enc:%d cdm:%lu match:%d\n",
> +			      iter.blk->type, iter.blk->id, rsvp->enc_id,
> +			      caps->intf_connect, match);
> 
>  		if (!match)
>  			continue;
> 
> +		trace_dpu_rm_reserve_cdm(iter.blk->id, iter.blk->type,
> +					 rsvp->enc_id);
>  		iter.blk->rsvp_nxt = rsvp;
> -		DPU_EVT32(iter.blk->type, rsvp->enc_id, iter.blk->id);
>  		break;
>  	}
> 
> @@ -709,7 +708,8 @@ static int _dpu_rm_reserve_intf(
>  		}
> 
>  		iter.blk->rsvp_nxt = rsvp;
> -		DPU_EVT32(iter.blk->type, rsvp->enc_id, iter.blk->id);
> +		trace_dpu_rm_reserve_intf(iter.blk->id, iter.blk->type,
> +					  rsvp->enc_id);
>  		break;
>  	}
> 
> @@ -801,7 +801,6 @@ static int _dpu_rm_populate_requirements(
>  		struct dpu_rm_requirements *reqs,
>  		struct msm_display_topology req_topology)
>  {
> -	const struct drm_display_mode *mode = &crtc_state->mode;
>  	int i;
> 
>  	memset(reqs, 0, sizeof(*reqs));
> @@ -830,15 +829,12 @@ static int _dpu_rm_populate_requirements(
>  		conn_state->connector->connector_type == DRM_MODE_CONNECTOR_DSI)
>  		reqs->top_ctrl |= BIT(DPU_RM_TOPCTL_DS);
> 
> -	DPU_DEBUG("top_ctrl: 0x%llX num_h_tiles: %d\n", reqs->top_ctrl,
> -			reqs->hw_res.display_num_of_h_tiles);
> -	DPU_DEBUG("num_lm: %d num_ctl: %d topology: %d split_display: %d\n",
> -			reqs->topology->num_lm, reqs->topology->num_ctl,
> -			reqs->topology->top_name,
> -			reqs->topology->needs_split_display);
> -	DPU_EVT32(mode->hdisplay, rm->lm_max_width, reqs->topology->num_lm,
> -			reqs->top_ctrl, reqs->topology->top_name,
> -			reqs->topology->num_ctl);
> +	DRM_DEBUG_KMS("top_ctrl: 0x%llX num_h_tiles: %d\n", reqs->top_ctrl,
> +		      reqs->hw_res.display_num_of_h_tiles);
> +	DRM_DEBUG_KMS("num_lm: %d num_ctl: %d topology: %d split_display: 
> %d\n",
> +		      reqs->topology->num_lm, reqs->topology->num_ctl,
> +		      reqs->topology->top_name,
> +		      reqs->topology->needs_split_display);
> 
>  	return 0;
>  }
> @@ -972,11 +968,9 @@ static int _dpu_rm_commit_rsvp(
>  		}
>  	}
> 
> -	if (!ret) {
> -		DPU_DEBUG("rsrv enc %d topology %d\n", rsvp->enc_id,
> -				rsvp->topology);
> -		DPU_EVT32(rsvp->enc_id, rsvp->topology);
> -	}
> +	if (!ret)
> +		DRM_DEBUG_KMS("rsrv enc %d topology %d\n", rsvp->enc_id,
> +			      rsvp->topology);
> 
>  	return ret;
>  }
> @@ -1002,10 +996,9 @@ int dpu_rm_reserve(
>  	if (!drm_atomic_crtc_needs_modeset(crtc_state))
>  		return 0;
> 
> -	DPU_DEBUG("reserving hw for conn %d enc %d crtc %d test_only %d\n",
> -			conn_state->connector->base.id, enc->base.id,
> -			crtc_state->crtc->base.id, test_only);
> -	DPU_EVT32(enc->base.id, conn_state->connector->base.id);
> +	DRM_DEBUG_KMS("reserving hw for conn %d enc %d crtc %d test_only 
> %d\n",
> +		      conn_state->connector->base.id, enc->base.id,
> +		      crtc_state->crtc->base.id, test_only);
> 
>  	mutex_lock(&rm->rm_lock);
> 
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h
> index 5d3aa5a994be..99c45b8d84c0 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h
> @@ -769,6 +769,55 @@ TRACE_EVENT(dpu_plane_disable,
>  		  __entry->multirect_mode)
>  );
> 
> +DECLARE_EVENT_CLASS(dpu_rm_iter_template,
> +	TP_PROTO(uint32_t id, enum dpu_hw_blk_type type, uint32_t enc_id),
> +	TP_ARGS(id, type, enc_id),
> +	TP_STRUCT__entry(
> +		__field(	uint32_t,		id	)
> +		__field(	enum dpu_hw_blk_type,	type	)
> +		__field(	uint32_t,		enc_id	)
> +	),
> +	TP_fast_assign(
> +		__entry->id = id;
> +		__entry->type = type;
> +		__entry->enc_id = enc_id;
> +	),
> +	TP_printk("id:%d type:%d enc_id:%u", __entry->id, __entry->type,
> +		  __entry->enc_id)
> +);
> +DEFINE_EVENT(dpu_rm_iter_template, dpu_rm_reserve_cdm,
> +	TP_PROTO(uint32_t id, enum dpu_hw_blk_type type, uint32_t enc_id),
> +	TP_ARGS(id, type, enc_id)
> +);
> +DEFINE_EVENT(dpu_rm_iter_template, dpu_rm_reserve_intf,
> +	TP_PROTO(uint32_t id, enum dpu_hw_blk_type type, uint32_t enc_id),
> +	TP_ARGS(id, type, enc_id)
> +);
> +DEFINE_EVENT(dpu_rm_iter_template, dpu_rm_reserve_ctls,
> +	TP_PROTO(uint32_t id, enum dpu_hw_blk_type type, uint32_t enc_id),
> +	TP_ARGS(id, type, enc_id)
> +);
> +
> +TRACE_EVENT(dpu_rm_reserve_lms,
> +	TP_PROTO(uint32_t id, enum dpu_hw_blk_type type, uint32_t enc_id,
> +		 uint32_t pp_id),
> +	TP_ARGS(id, type, enc_id, pp_id),
> +	TP_STRUCT__entry(
> +		__field(	uint32_t,		id	)
> +		__field(	enum dpu_hw_blk_type,	type	)
> +		__field(	uint32_t,		enc_id	)
> +		__field(	uint32_t,		pp_id	)
> +	),
> +	TP_fast_assign(
> +		__entry->id = id;
> +		__entry->type = type;
> +		__entry->enc_id = enc_id;
> +		__entry->pp_id = pp_id;
> +	),
> +	TP_printk("id:%d type:%d enc_id:%u pp_id:%u", __entry->id,
> +		  __entry->type, __entry->enc_id, __entry->pp_id)
> +);
> +
>  #define DPU_ATRACE_END(name) trace_tracing_mark_write(current->tgid, 
> name, 0)
>  #define DPU_ATRACE_BEGIN(name) trace_tracing_mark_write(current->tgid, 
> name, 1)
>  #define DPU_ATRACE_FUNC() DPU_ATRACE_BEGIN(__func__)
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

  parent reply	other threads:[~2018-06-26 10:30 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 20:48 [DPU PATCH 00/19] drm/msm: dpu: Clean up dpu_dbg Sean Paul
     [not found] ` <20180620204841.56354-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-20 20:48   ` [DPU PATCH 01/19] drm/msm: dpu_encoder: Replace DPU_EVT with tracepoints Sean Paul
     [not found]     ` <20180620204841.56354-2-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26 15:57       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 02/19] drm/msm: dpu_crtc: " Sean Paul
     [not found]     ` <20180620204841.56354-3-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26 15:45       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 03/19] drm/msm: dpu_plane: " Sean Paul
     [not found]     ` <20180620204841.56354-4-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26  6:39       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 04/19] drm/msm: dpu_rm: " Sean Paul
     [not found]     ` <20180620204841.56354-5-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26 10:30       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ [this message]
2018-06-20 20:48   ` [DPU PATCH 05/19] drm/msm: dpu_kms: " Sean Paul
     [not found]     ` <20180620204841.56354-6-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26  6:42       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 06/19] drm/msm: dpu_encoder_phys_cmd: " Sean Paul
     [not found]     ` <20180620204841.56354-7-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26 10:37       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 07/19] drm/msm: dpu_encoder_phys_vid: " Sean Paul
     [not found]     ` <20180620204841.56354-8-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26 10:47       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 08/19] drm/msm: dpu_vbif: " Sean Paul
     [not found]     ` <20180620204841.56354-9-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26  6:43       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 09/19] drm/msm: dpu_pingpong: " Sean Paul
     [not found]     ` <20180620204841.56354-10-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26  6:45       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 10/19] drm/msm: dpu_core_irq: " Sean Paul
     [not found]     ` <20180620204841.56354-11-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26 10:51       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 11/19] drm/msm: dpu_core_perf: " Sean Paul
     [not found]     ` <20180620204841.56354-12-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26  6:46       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 12/19] drm/msm: dpu_mdss: Replace DPU_EVT with DRM_ERROR Sean Paul
     [not found]     ` <20180620204841.56354-13-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26  6:47       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 13/19] drm/msm: dpu: Remove dpu evtlog Sean Paul
     [not found]     ` <20180620204841.56354-14-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-06-26  6:52       ` ryadav-sgV2jX0FEOL9JmXXK+q4OQ
2018-06-20 20:48   ` [DPU PATCH 14/19] drm/msm: dpu_dbg: Remove dump_all option for dumping registers Sean Paul
2018-06-20 20:48   ` [DPU PATCH 15/19] drm/msm: dpu: Remove arbitrary register dumps Sean Paul
2018-06-20 20:48   ` [DPU PATCH 16/19] drm/msm: dpu: Remove panic from dpu debug dump Sean Paul
2018-06-20 20:48   ` [DPU PATCH 17/19] drm/msm: dpu: Remove dsi debug block name Sean Paul
2018-06-20 20:48   ` [DPU PATCH 18/19] drm/msm: dpu_dbg: Remove string parsing from DBG_DUMP Sean Paul
2018-06-20 20:48   ` [DPU PATCH 19/19] drm/msm: dpu: Move dpu_dbg into dpu1 directory Sean Paul

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=959a1d0ad0f72997ee24f7d4cd7025f6@codeaurora.org \
    --to=ryadav-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=abhinavk-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=hoegsberg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    /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