diff --git a/driver/vidc/inc/msm_vidc_debug.h b/driver/vidc/inc/msm_vidc_debug.h index 83094620e7..c9d84c6f00 100644 --- a/driver/vidc/inc/msm_vidc_debug.h +++ b/driver/vidc/inc/msm_vidc_debug.h @@ -130,6 +130,8 @@ enum vidc_msg_prio { #define d_vpr_t(__fmt, ...) dprintk_core(VIDC_PKT, "pkt ", __fmt, ##__VA_ARGS__) #define d_vpr_b(__fmt, ...) dprintk_core(VIDC_BUS, "bus ", __fmt, ##__VA_ARGS__) #define d_vpr_s(__fmt, ...) dprintk_core(VIDC_STAT, "stat", __fmt, ##__VA_ARGS__) +#define d_vpr_hs(__fmt, ...) \ + dprintk_core(VIDC_HIGH | VIDC_STAT, "high", __fmt, ##__VA_ARGS__) #define dprintk_ratelimit(__level, __level_str, __fmt, ...) \ do { \ diff --git a/driver/vidc/src/msm_vidc_driver.c b/driver/vidc/src/msm_vidc_driver.c index 6f77a9e517..73e461436a 100644 --- a/driver/vidc/src/msm_vidc_driver.c +++ b/driver/vidc/src/msm_vidc_driver.c @@ -309,7 +309,7 @@ int msm_vidc_add_buffer_stats(struct msm_vidc_inst *inst, } core = inst->core; - if (!(msm_vidc_debug & VIDC_STAT)) + if (!(msm_vidc_debug & VIDC_LOW)) return 0; /* stats applicable only to input & output buffers */ @@ -353,7 +353,7 @@ int msm_vidc_remove_buffer_stats(struct msm_vidc_inst *inst, } core = inst->core; - if (!(msm_vidc_debug & VIDC_STAT)) + if (!(msm_vidc_debug & VIDC_LOW)) return 0; /* stats applicable only to input & output buffers */ @@ -407,7 +407,7 @@ int msm_vidc_remove_buffer_stats(struct msm_vidc_inst *inst, /* remove stats node */ if (remove_stat) { list_del_init(&stats->list); - print_buffer_stats(VIDC_STAT, "stat", inst, stats); + print_buffer_stats(VIDC_LOW, "low ", inst, stats); msm_vidc_pool_free(inst, stats); } } diff --git a/driver/vidc/src/resources.c b/driver/vidc/src/resources.c index 5495c859fe..a8b8a16c14 100644 --- a/driver/vidc/src/resources.c +++ b/driver/vidc/src/resources.c @@ -1222,9 +1222,9 @@ static int print_residency_stats(struct msm_vidc_core *core, struct clock_info * /* print residency percent for each clock */ list_for_each_entry(residency, &cl->residency_list, list) { - d_vpr_h("%s: %s clock rate [%d] total %lluus residency %u%%\n", + d_vpr_hs("%s: %s clock rate [%d] total %lluus residency %u%%\n", __func__, cl->name, residency->rate, residency->total_time_us, - residency->total_time_us * 100 / total_time_us); + (residency->total_time_us * 100 + total_time_us - 1) / total_time_us); } return rc;