MALI: utgard: rockchip: avoid crash when CONFIG_GPU_TRACEPOINTS enabled

Change-Id: Icbb4f9e1b56a9a23cd7041c589e9814743fe562b
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
This commit is contained in:
chenzhen
2016-07-27 11:22:30 +08:00
committed by Huang, Tao
parent 78da86a86a
commit 85c2e5b901
3 changed files with 32 additions and 19 deletions

View File

@@ -182,7 +182,8 @@ static void mali_gp_scheduler_schedule_internal_and_unlock(void)
MALI_DEBUG_PRINT(4, ("Mali GP scheduler: Nothing to schedule (paused=%u, idle slots=%u)\n",
pause_count, MALI_GP_SLOT_STATE_IDLE == slot.state ? 1 : 0));
#if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)
trace_gpu_sched_switch(mali_gp_get_hw_core_desc(group->gp_core), sched_clock(), 0, 0, 0);
if (group->gp_core)
trace_gpu_sched_switch(mali_gp_get_hw_core_desc(group->gp_core), sched_clock(), 0, 0, 0);
#endif
return; /* Nothing to do, so early out */
}

View File

@@ -696,10 +696,12 @@ void mali_group_add_group(struct mali_group *parent, struct mali_group *child)
MALI_PROFILING_EVENT_REASON_START_STOP_HW_VIRTUAL,
mali_pp_job_get_pid(job), mali_pp_job_get_tid(job), 0, 0, 0);
#if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)
trace_gpu_sched_switch(
mali_pp_core_description(child->pp_core),
sched_clock(), mali_pp_job_get_tid(job),
0, mali_pp_job_get_id(job));
if (child->pp_core) {
trace_gpu_sched_switch(
mali_pp_core_description(child->pp_core),
sched_clock(), mali_pp_job_get_tid(job),
0, mali_pp_job_get_id(job));
}
#endif
#if defined(CONFIG_MALI400_PROFILING)
@@ -849,9 +851,11 @@ void mali_group_start_gp_job(struct mali_group *group, struct mali_gp_job *job)
#endif /* #if defined(CONFIG_MALI400_PROFILING) */
#if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)
trace_gpu_sched_switch(mali_gp_core_description(group->gp_core),
sched_clock(), mali_gp_job_get_tid(job),
0, mali_gp_job_get_id(job));
if (group->gp_core) {
trace_gpu_sched_switch(mali_gp_core_description(group->gp_core),
sched_clock(), mali_gp_job_get_tid(job),
0, mali_gp_job_get_id(job));
}
#endif
group->gp_running_job = job;
@@ -977,9 +981,11 @@ void mali_group_start_pp_job(struct mali_group *group, struct mali_pp_job *job,
}
#if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)
trace_gpu_sched_switch(mali_pp_core_description(group->pp_core),
sched_clock(), mali_pp_job_get_tid(job),
0, mali_pp_job_get_id(job));
if (group->pp_core) {
trace_gpu_sched_switch(mali_pp_core_description(group->pp_core),
sched_clock(), mali_pp_job_get_tid(job),
0, mali_pp_job_get_id(job));
}
#endif
group->pp_running_job = job;
@@ -1149,9 +1155,11 @@ struct mali_pp_job *mali_group_complete_pp(struct mali_group *group, mali_bool s
}
#if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)
trace_gpu_sched_switch(
mali_gp_core_description(group->gp_core),
sched_clock(), 0, 0, 0);
if (group->gp_core) {
trace_gpu_sched_switch(
mali_gp_core_description(group->gp_core),
sched_clock(), 0, 0, 0);
}
#endif
}
@@ -1207,9 +1215,11 @@ struct mali_gp_job *mali_group_complete_gp(struct mali_group *group, mali_bool s
#endif
#if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)
trace_gpu_sched_switch(
mali_pp_core_description(group->pp_core),
sched_clock(), 0, 0, 0);
if (group->pp_core) {
trace_gpu_sched_switch(
mali_pp_core_description(group->pp_core),
sched_clock(), 0, 0, 0);
}
#endif
#if defined(CONFIG_MALI400_PROFILING)

View File

@@ -867,7 +867,8 @@ static void mali_pp_scheduler_set_group_idle_and_unlock(struct mali_group *group
_mali_osk_list_move(&(group->pp_scheduler_list), &group_list_idle);
#if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)
trace_gpu_sched_switch(mali_pp_get_hw_core_desc(group->pp_core), sched_clock(), 0, 0, 0);
if (group->pp_core)
trace_gpu_sched_switch(mali_pp_get_hw_core_desc(group->pp_core), sched_clock(), 0, 0, 0);
#endif
mali_pp_scheduler_unlock();
@@ -1087,7 +1088,8 @@ void mali_pp_scheduler_job_done(struct mali_group *group, struct mali_pp_job *jo
}
#if defined(CONFIG_GPU_TRACEPOINTS) && defined(CONFIG_TRACEPOINTS)
trace_gpu_sched_switch(mali_pp_get_hw_core_desc(group->pp_core), sched_clock(), 0, 0, 0);
if (group->pp_core)
trace_gpu_sched_switch(mali_pp_get_hw_core_desc(group->pp_core), sched_clock(), 0, 0, 0);
#endif
_mali_osk_wait_queue_wake_up(pp_scheduler_working_wait_queue);