This patch converts all DPU_EVTs in dpu_kms with either a DRM_* log message or a linux tracepoint. Signed-off-by: Sean Paul <seanpaul@xxxxxxxxxxxx> --- 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), -- Sean Paul, Software Engineer, Google / Chromium OS -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html