Explorar o código

video: driver: adding guard to residency calc. based on logmask

update or print the residency calc. only when high or stats logs
are enabled

Change-Id: Ie5e936a56865702417b4bb6a4657abf864510032
Signed-off-by: Ashish Patil <[email protected]>
Ashish Patil %!s(int64=2) %!d(string=hai) anos
pai
achega
8ffb37d04b
Modificáronse 2 ficheiros con 8 adicións e 0 borrados
  1. 4 0
      driver/vidc/src/resources.c
  2. 4 0
      driver/vidc/src/resources_ext.c

+ 4 - 0
driver/vidc/src/resources.c

@@ -1264,6 +1264,10 @@ static int update_residency_stats(
 	u64 cur_time_us = 0;
 	int rc = 0;
 
+	/* skip update if high or stats logs not enabled */
+	if(!(msm_vidc_debug & (VIDC_HIGH | VIDC_STAT)))
+		return 0;
+
 	if (!core || !cl) {
 		d_vpr_e("%s: invalid params\n", __func__);
 		return -EINVAL;

+ 4 - 0
driver/vidc/src/resources_ext.c

@@ -337,6 +337,10 @@ static int update_residency_stats(
 	u64 cur_time_us = 0;
 	int rc = 0;
 
+	/* skip update if high or stats logs not enabled */
+	if(!(msm_vidc_debug & (VIDC_HIGH | VIDC_STAT)))
+		return 0;
+
 	if (!core || !cl) {
 		d_vpr_e("%s: invalid params\n", __func__);
 		return -EINVAL;