]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/msm/gpu: Add suspend/resume tracepoints
authorRob Clark <robdclark@chromium.org>
Tue, 1 Sep 2020 15:41:56 +0000 (08:41 -0700)
committerRob Clark <robdclark@chromium.org>
Sat, 12 Sep 2020 16:59:58 +0000 (09:59 -0700)
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a6xx_gpu.c
drivers/gpu/drm/msm/msm_gpu.c
drivers/gpu/drm/msm/msm_gpu_trace.h

index 74bc27eb4203c2298578b53002fe17dfab10f31f..a7f63be9cdd006c8ceb8e0075f18523162601f87 100644 (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);
index cec6ec1d3aa730c9904417e661c06b10ad83a3f9..ce68ff0732a50ef49f4bf9f2c4836b411d01c87e 100644 (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);
 
index 1079fe5512798d2d9f6f25748847c50f4fbc0401..03e0c2536b94bce56e040cdaf18d417128c54836 100644 (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