From patchwork Wed Jun 20 20:48:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10478689 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3E19960532 for ; Wed, 20 Jun 2018 20:48:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3118E28372 for ; Wed, 20 Jun 2018 20:48:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 257B32838F; Wed, 20 Jun 2018 20:48:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9272628372 for ; Wed, 20 Jun 2018 20:48:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933233AbeFTUsr (ORCPT ); Wed, 20 Jun 2018 16:48:47 -0400 Received: from mail-yb0-f171.google.com ([209.85.213.171]:39335 "EHLO mail-yb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933217AbeFTUsq (ORCPT ); Wed, 20 Jun 2018 16:48:46 -0400 Received: by mail-yb0-f171.google.com with SMTP id i2-v6so362226ybg.6 for ; Wed, 20 Jun 2018 13:48:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mMiv51BNF0g3unijAVeDogjaD78g7wc1tf5YIqSQuGs=; b=l74KJ0rwxlOoVs8HGNYJ2pUFnuxIiz4RvGa/Vmm2NxYalc4lqD1z9GaMQtxirG6BfS yzxY1uj7NcAnGgsRA4Q99iOmrASv1Jw6CSmkg40dBpa0JSaWOJLqyqIZFrJBqhUFUjXh VobODL8sFHW8WQOgZ3bYRbnqv4nTArQddASV4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mMiv51BNF0g3unijAVeDogjaD78g7wc1tf5YIqSQuGs=; b=q0dP3zOLaaVK4cWB3LU2Ycs9XVvkyUmFJ9VJ4hrrAgiDLkwStLNEuregIGTBy+aST+ LgD3dcdcS/kHq6mcNyti2UNiNuKElJte+FSyXA1XoLU1Febm9Qqr6LTcRea0ZvWPb5pE kov79ZWocBxJ4A8p87S0l5NZxmVHLb/XolC9x7ro6cRKZJaFearUpbpxZsbkaf+o7KRQ Xfl/6qxxNGP5ktpRd+C1SX2rrC+DIGa4VThQyEh4n8yIY3BPJwoH85oC6M2A1CxKJzxP wBvBJQCKxTuJu+jrgJV5hLNEUX+O67YaW0RMMlEvA0foEF8ElkFRi7uHEqG+ie8RDbzy 3YWQ== X-Gm-Message-State: APt69E0mfCKNQGqH3UvMsqACeQTo/TtZICsrgV9IeDhErcPMukp6AJ1U wLrXnEjoztHdp4dwVxEPLWc2iQ== X-Google-Smtp-Source: ADUXVKJMxrH4ddSP2QIdxuKDETWVOI6wclCZuHq+CekNAJC8nM8Smj1t9ykZJkvHlEFHOgZDxtCoYw== X-Received: by 2002:a25:3b89:: with SMTP id i131-v6mr11265495yba.245.1529527725417; Wed, 20 Jun 2018 13:48:45 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id p3-v6sm1173865ywh.36.2018.06.20.13.48.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 13:48:44 -0700 (PDT) From: Sean Paul To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: robdclark@gmail.com, hoegsberg@chromium.org, jsanka@codeaurora.org, abhinavk@codeaurora.org, Sean Paul Subject: [DPU PATCH 03/19] drm/msm: dpu_plane: Replace DPU_EVT with tracepoints Date: Wed, 20 Jun 2018 16:48:25 -0400 Message-Id: <20180620204841.56354-4-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.rc1.244.gcf134e6275-goog In-Reply-To: <20180620204841.56354-1-seanpaul@chromium.org> References: <20180620204841.56354-1-seanpaul@chromium.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch converts all DPU_EVTs in dpu_plane with either a DRM_* log message or a linux tracepoint. Signed-off-by: Sean Paul Reviewed-by: Rajesh Yadav --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 19 +++------- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 44 +++++++++++++++++++++++ 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index 6090ace6012a..2c3dc00477b3 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -609,18 +609,9 @@ static inline void _dpu_plane_set_scanout(struct drm_plane *plane, else if (ret) DPU_ERROR_PLANE(pdpu, "failed to get format layout, %d\n", ret); else if (pdpu->pipe_hw->ops.setup_sourceaddress) { - DPU_EVT32_VERBOSE(pdpu->pipe_hw->idx, - pipe_cfg->layout.width, - pipe_cfg->layout.height, - pipe_cfg->layout.plane_addr[0], - pipe_cfg->layout.plane_size[0], - pipe_cfg->layout.plane_addr[1], - pipe_cfg->layout.plane_size[1], - pipe_cfg->layout.plane_addr[2], - pipe_cfg->layout.plane_size[2], - pipe_cfg->layout.plane_addr[3], - pipe_cfg->layout.plane_size[3], - pstate->multirect_index); + trace_dpu_plane_set_scanout(pdpu->pipe_hw->idx, + &pipe_cfg->layout, + pstate->multirect_index); pdpu->pipe_hw->ops.setup_sourceaddress(pdpu->pipe_hw, pipe_cfg, pstate->multirect_index); } @@ -1420,8 +1411,8 @@ static void _dpu_plane_atomic_disable(struct drm_plane *plane, state = plane->state; pstate = to_dpu_plane_state(state); - DPU_EVT32(DRMID(plane), is_dpu_plane_virtual(plane), - pstate->multirect_mode); + trace_dpu_plane_disable(DRMID(plane), is_dpu_plane_virtual(plane), + pstate->multirect_mode); pstate->pending = true; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h index 877621184782..5d3aa5a994be 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h @@ -725,6 +725,50 @@ TRACE_EVENT(dpu_crtc_disable_frame_pending, __entry->frame_pending) ); +TRACE_EVENT(dpu_plane_set_scanout, + TP_PROTO(enum dpu_sspp index, struct dpu_hw_fmt_layout *layout, + enum dpu_sspp_multirect_index multirect_index), + TP_ARGS(index, layout, multirect_index), + TP_STRUCT__entry( + __field( enum dpu_sspp, index ) + __field( struct dpu_hw_fmt_layout*, layout ) + __field( enum dpu_sspp_multirect_index, multirect_index) + ), + TP_fast_assign( + __entry->index = index; + __entry->layout = layout; + __entry->multirect_index = multirect_index; + ), + TP_printk("index:%d layout:{%ux%u @ [%u/%u, %u/%u, %u/%u, %u/%u]} " + "multirect_index:%d", __entry->index, __entry->layout->width, + __entry->layout->height, __entry->layout->plane_addr[0], + __entry->layout->plane_size[0], + __entry->layout->plane_addr[1], + __entry->layout->plane_size[1], + __entry->layout->plane_addr[2], + __entry->layout->plane_size[2], + __entry->layout->plane_addr[3], + __entry->layout->plane_size[3], __entry->multirect_index) +); + +TRACE_EVENT(dpu_plane_disable, + TP_PROTO(uint32_t drm_id, bool is_virtual, uint32_t multirect_mode), + TP_ARGS(drm_id, is_virtual, multirect_mode), + TP_STRUCT__entry( + __field( uint32_t, drm_id ) + __field( bool, is_virtual ) + __field( uint32_t, multirect_mode ) + ), + TP_fast_assign( + __entry->drm_id = drm_id; + __entry->is_virtual = is_virtual; + __entry->multirect_mode = multirect_mode; + ), + TP_printk("id:%u is_virtual:%s multirect_mode:%u", __entry->drm_id, + __entry->is_virtual ? "true" : "false", + __entry->multirect_mode) +); + #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__)