From patchwork Wed Jun 20 20:48:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10478707 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 8408160230 for ; Wed, 20 Jun 2018 20:48:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 750C328355 for ; Wed, 20 Jun 2018 20:48:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69AB3283A5; Wed, 20 Jun 2018 20:48:55 +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 12ECC28355 for ; Wed, 20 Jun 2018 20:48:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933315AbeFTUsy (ORCPT ); Wed, 20 Jun 2018 16:48:54 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:33241 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933285AbeFTUsx (ORCPT ); Wed, 20 Jun 2018 16:48:53 -0400 Received: by mail-yw0-f193.google.com with SMTP id u124-v6so350320ywg.0 for ; Wed, 20 Jun 2018 13:48:53 -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=jyT4mhRmvpIt6Zsr02jZVDVLGneF/p6lNq59a6u+wtE=; b=JW+75hZC24t1b7Eee9Z6R/dZjIMpVMvijZV3HUYyJDXM4iDEzB/sQYpjvO/YIvbOd7 9r4UVV5P3ji+Hyt9QV9jnX3FAUUyTBLmEYgxbWY+KP83GQUfwUXv+tn44UphRqLWjFqk EeszIYSZ/5j03905jwQC+sCSJjVVH+cdSb+8o= 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=jyT4mhRmvpIt6Zsr02jZVDVLGneF/p6lNq59a6u+wtE=; b=umYobAId2wd4TocVtRdlvQm6SYqITWfiktJEoz4UhnYcUo9JK5b8WAu8lZ86U0wrKy d6VVC/FRlB2rE3AyI1HzpsJmVPbO6upHrw6kzN/mxLuyF/EUtG+svbPOR4XJ8DFrogRY rhx1AOGB8aC2tZKa/u0/Tm1wdSAsccoWTl66Ywyts7WtjJAQzfz4TCzmZAPgVQFRM4yN fhPtk6Tr3b6qlhcPr6rAaJ8WcxSM/ZMI4xiTlTtT3CNZx5pkpPLO1Txohinbz7+iavzP 4WuJl4F8f8MeC1d8D1UrO+NZOkSy+Z+v1xGFuZqOhzHvaY263VFe33CXxsIQNR3KNYMV P8ew== X-Gm-Message-State: APt69E3Uur7kVOi5wYuX2tSxIEbv8+dLZ6+9tTZKe1jncHGW4MVTreNb 67s/M9Pnh1VtzEWA6HeGIUTAqA== X-Google-Smtp-Source: ADUXVKKKwAo6Xkkf/8KAzj7NpS0YuebpbjLPIOTogWZF0t1TSRYoWeUFJmIcU/ufw/SBUy9/8ADdrA== X-Received: by 2002:a81:6088:: with SMTP id u130-v6mr11207453ywb.418.1529527732656; Wed, 20 Jun 2018 13:48:52 -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.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 13:48:51 -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 11/19] drm/msm: dpu_core_perf: Replace DPU_EVT with tracepoints Date: Wed, 20 Jun 2018 16:48:33 -0400 Message-Id: <20180620204841.56354-12-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_core_perf 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_core_perf.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c index 6c0f66cc177f..1019ce7594ff 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c @@ -474,7 +474,7 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc, if (update_clk) { clk_rate = _dpu_core_perf_get_core_clk_rate(kms); - DPU_EVT32(kms->dev, stop_req, clk_rate); + trace_dpu_core_perf_update_clk(kms->dev, stop_req, clk_rate); ret = _dpu_core_perf_set_core_clk_rate(kms, clk_rate); if (ret) { diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h index ee41db86a2e9..d6f117bdad24 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h @@ -1016,6 +1016,23 @@ DEFINE_EVENT(dpu_core_irq_callback_template, dpu_core_irq_unregister_callback, TP_ARGS(irq_idx, callback) ); +TRACE_EVENT(dpu_core_perf_update_clk, + TP_PROTO(struct drm_device *dev, bool stop_req, u64 clk_rate), + TP_ARGS(dev, stop_req, clk_rate), + TP_STRUCT__entry( + __field( struct drm_device *, dev ) + __field( bool, stop_req ) + __field( u64, clk_rate ) + ), + TP_fast_assign( + __entry->dev = dev; + __entry->stop_req = stop_req; + __entry->clk_rate = clk_rate; + ), + TP_printk("dev:%s stop_req:%s clk_rate:%llu", __entry->dev->unique, + __entry->stop_req ? "true" : "false", __entry->clk_rate) +); + #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__)