From patchwork Wed Jun 20 20:48:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10478695 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 0273860383 for ; Wed, 20 Jun 2018 20:48:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E793428355 for ; Wed, 20 Jun 2018 20:48:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC13428384; Wed, 20 Jun 2018 20:48:50 +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 6A1F428355 for ; Wed, 20 Jun 2018 20:48:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933268AbeFTUst (ORCPT ); Wed, 20 Jun 2018 16:48:49 -0400 Received: from mail-yb0-f194.google.com ([209.85.213.194]:39910 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933217AbeFTUss (ORCPT ); Wed, 20 Jun 2018 16:48:48 -0400 Received: by mail-yb0-f194.google.com with SMTP id i2-v6so362249ybg.6 for ; Wed, 20 Jun 2018 13:48:47 -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=dwOD9nG0Eu0fpluKt6ih6SNTVcb/6Aje0PMA3GWyi8E=; b=KvT2zh8og9SRcJ6ZkTRLhEsf56x/1X7SfPt0+5nkYJtKwSEIlYAaxYHoUZsUuVeSfX teOyBbWZ23guXaH8pTP5yd74zqRLRGC2/5Gch+Ka7A6/06TZ8D602tsdWQEGsLmDb3ba Fz2N+fvGSCdWqrzJYP31xHlb3q72YoUKVOxSU= 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=dwOD9nG0Eu0fpluKt6ih6SNTVcb/6Aje0PMA3GWyi8E=; b=QSGMTKDnqDNX0cYNUcZsRXqHSTVmQsIC0T6oKhFvxHZ1YvVtDa/Y09HV7GR1s08KIB xd+U/iiLUmL/m57lvChYW799FKM5Y5Ac36UVZz/xNm1/SC43HikjucjX9QZ3N8Np7CQ8 TbHr4eNdM2AwJZ0N8YpzR37VKrjWntFu5sx0IL6E2svWrAWJ8KdhT/H2v/nNSasyO6mj CR28yxLZ/jBOwq08dJzbpzuhhVxsOkcMjwAmeU3EUjVKFnHBp5xRTNEiyoeaKekyYOSM qWdkb+lq91Vlus/m/YE5lp5PvQw1lEwpEc1LqvX1Z9oP1N21UOvFPKb8wl0G/14rw99W P0bA== X-Gm-Message-State: APt69E3Pf4wNPLsrXwQtuJXRQ3OkG7A/OfkpwObgyTQjgoG5O4D27tLu oJ47ei5/nNIbnQDB9YXgujMGhQ== X-Google-Smtp-Source: ADUXVKJtVyn0ROV9kbEXIy+qiBf+6gZTttMMglCjzNg3L1l2y89uUR1Ab5iTnViqc7Q/bw+t+1Hw5Q== X-Received: by 2002:a25:2ad2:: with SMTP id q201-v6mr7343565ybq.512.1529527727405; Wed, 20 Jun 2018 13:48:47 -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.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 13:48:46 -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 05/19] drm/msm: dpu_kms: Replace DPU_EVT with tracepoints Date: Wed, 20 Jun 2018 16:48:27 -0400 Message-Id: <20180620204841.56354-6-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_kms 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_kms.c | 19 ++++++++++++------- drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h | 16 ++++++++++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index fe614c06bb7b..6ae5bba21074 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -362,7 +362,7 @@ static void dpu_kms_wait_for_frame_transfer_complete(struct msm_kms *kms, * Cmd Mode - Wait for PP_DONE. Will be no-op if transfer is * complete */ - DPU_EVT32_VERBOSE(DRMID(crtc)); + trace_dpu_kms_wait_for_frame_transfer(DRMID(crtc)); ret = dpu_encoder_wait_for_event(encoder, MSM_ENC_TX_COMPLETE); if (ret && ret != -EWOULDBLOCK) { DPU_ERROR( @@ -410,7 +410,7 @@ void dpu_kms_encoder_enable(struct drm_encoder *encoder) funcs->commit(encoder); if (crtc && crtc->state->active) { - DPU_EVT32(DRMID(crtc)); + trace_dpu_kms_enc_enable(DRMID(crtc)); dpu_crtc_commit_kickoff(crtc); } } @@ -427,7 +427,7 @@ static void dpu_kms_commit(struct msm_kms *kms, struct drm_atomic_state *state) continue; if (crtc->state->active) { - DPU_EVT32(DRMID(crtc)); + trace_dpu_kms_commit(DRMID(crtc)); dpu_crtc_commit_kickoff(crtc); } } @@ -450,12 +450,14 @@ static void dpu_kms_complete_commit(struct msm_kms *kms, return; priv = dpu_kms->dev->dev_private; + DPU_ATRACE_BEGIN("kms_complete_commit"); + for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) dpu_crtc_complete_commit(crtc, old_crtc_state); pm_runtime_put_sync(&dpu_kms->pdev->dev); - DPU_EVT32_VERBOSE(DPU_EVTLOG_FUNC_EXIT); + DPU_ATRACE_END("kms_complete_commit"); } static void dpu_kms_wait_for_commit_done(struct msm_kms *kms, @@ -490,7 +492,7 @@ static void dpu_kms_wait_for_commit_done(struct msm_kms *kms, * plane_cleanup. For example, wait for vsync in case of video * mode panels. This may be a no-op for command mode panels. */ - DPU_EVT32_VERBOSE(DRMID(crtc)); + trace_dpu_kms_wait_for_commit_done(DRMID(crtc)); ret = dpu_encoder_wait_for_event(encoder, MSM_ENC_COMMIT_DONE); if (ret && ret != -EWOULDBLOCK) { DPU_ERROR("wait for commit done returned %d\n", ret); @@ -1137,7 +1139,6 @@ static int dpu_kms_pm_suspend(struct device *dev) return -EINVAL; dpu_kms = to_dpu_kms(ddev_to_msm_kms(ddev)); - DPU_EVT32(0); /* disable hot-plug polling */ drm_kms_helper_poll_disable(ddev); @@ -1146,6 +1147,8 @@ static int dpu_kms_pm_suspend(struct device *dev) drm_modeset_acquire_init(&ctx, 0); retry: + DPU_ATRACE_BEGIN("kms_pm_suspend"); + ret = drm_modeset_lock_all_ctx(ddev, &ctx); if (ret) goto unlock; @@ -1195,6 +1198,7 @@ static int dpu_kms_pm_suspend(struct device *dev) drm_modeset_drop_locks(&ctx); drm_modeset_acquire_fini(&ctx); + DPU_ATRACE_END("kms_pm_suspend"); return 0; } @@ -1213,7 +1217,7 @@ static int dpu_kms_pm_resume(struct device *dev) dpu_kms = to_dpu_kms(ddev_to_msm_kms(ddev)); - DPU_EVT32(dpu_kms->suspend_state != NULL); + DPU_ATRACE_BEGIN("kms_pm_resume"); drm_mode_config_reset(ddev); @@ -1236,6 +1240,7 @@ static int dpu_kms_pm_resume(struct device *dev) /* enable hot-plug polling */ drm_kms_helper_poll_enable(ddev); + DPU_ATRACE_END("kms_pm_resume"); return 0; } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h index 99c45b8d84c0..7169ff3a9805 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h @@ -338,6 +338,22 @@ DEFINE_EVENT(dpu_drm_obj_template, dpu_crtc_complete_commit, TP_PROTO(uint32_t drm_id), TP_ARGS(drm_id) ); +DEFINE_EVENT(dpu_drm_obj_template, dpu_kms_wait_for_frame_transfer, + TP_PROTO(uint32_t drm_id), + TP_ARGS(drm_id) +); +DEFINE_EVENT(dpu_drm_obj_template, dpu_kms_enc_enable, + TP_PROTO(uint32_t drm_id), + TP_ARGS(drm_id) +); +DEFINE_EVENT(dpu_drm_obj_template, dpu_kms_commit, + TP_PROTO(uint32_t drm_id), + TP_ARGS(drm_id) +); +DEFINE_EVENT(dpu_drm_obj_template, dpu_kms_wait_for_commit_done, + TP_PROTO(uint32_t drm_id), + TP_ARGS(drm_id) +); TRACE_EVENT(dpu_enc_enable, TP_PROTO(uint32_t drm_id, int hdisplay, int vdisplay),