drm/msm/gpu: Add suspend/resume tracepoints

Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
Rob Clark 2020-09-01 08:41:56 -07:00
parent 1ef7c99d14
commit ec1cb6e440
3 changed files with 32 additions and 0 deletions

View File

@ -931,6 +931,8 @@ static int a6xx_pm_resume(struct msm_gpu *gpu)
gpu->needs_hw_init = true;
trace_msm_gpu_resume(0);
ret = a6xx_gmu_resume(a6xx_gpu);
if (ret)
return ret;
@ -945,6 +947,8 @@ static int a6xx_pm_suspend(struct msm_gpu *gpu)
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
struct a6xx_gpu *a6xx_gpu = to_a6xx_gpu(adreno_gpu);
trace_msm_gpu_suspend(0);
devfreq_suspend_device(gpu->devfreq.devfreq);
return a6xx_gmu_stop(a6xx_gpu);

View File

@ -202,6 +202,7 @@ int msm_gpu_pm_resume(struct msm_gpu *gpu)
int ret;
DBG("%s", gpu->name);
trace_msm_gpu_resume(0);
ret = enable_pwrrail(gpu);
if (ret)
@ -227,6 +228,7 @@ int msm_gpu_pm_suspend(struct msm_gpu *gpu)
int ret;
DBG("%s", gpu->name);
trace_msm_gpu_suspend(0);
devfreq_suspend_device(gpu->devfreq.devfreq);

View File

@ -140,6 +140,32 @@ TRACE_EVENT(msm_gem_purge_vmaps,
TP_printk("Purging %u vmaps", __entry->unmapped)
);
TRACE_EVENT(msm_gpu_suspend,
TP_PROTO(int dummy),
TP_ARGS(dummy),
TP_STRUCT__entry(
__field(u32, dummy)
),
TP_fast_assign(
__entry->dummy = dummy;
),
TP_printk("%u", __entry->dummy)
);
TRACE_EVENT(msm_gpu_resume,
TP_PROTO(int dummy),
TP_ARGS(dummy),
TP_STRUCT__entry(
__field(u32, dummy)
),
TP_fast_assign(
__entry->dummy = dummy;
),
TP_printk("%u", __entry->dummy)
);
#endif
#undef TRACE_INCLUDE_PATH