Commit ec1cb6e4 authored by Rob Clark's avatar Rob Clark

drm/msm/gpu: Add suspend/resume tracepoints

Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 1ef7c99d
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment