Kaynağa Gözat

msm: eva: Use rate limited printk API

Avoid potential system level RT throttling issue.

Change-Id: I0fbe198957ef9e5c21435fef2c6e8b6df551da5b
Signed-off-by: George Shen <[email protected]>
George Shen 3 yıl önce
ebeveyn
işleme
7cc6e333d2
4 değiştirilmiş dosya ile 8 ekleme ve 6 silme
  1. 2 2
      msm/eva/cvp_hfi.c
  2. 1 1
      msm/eva/msm_cvp.c
  3. 4 2
      msm/eva/msm_cvp_core.c
  4. 1 1
      msm/eva/msm_cvp_debug.h

+ 2 - 2
msm/eva/cvp_hfi.c

@@ -3903,7 +3903,7 @@ static int __iris_power_on(struct iris_hfi_device *device)
 	enable_irq(device->cvp_hal_data->irq);
 	__write_register(device,
 		CVP_WRAPPER_DEBUG_BRIDGE_LPI_CONTROL, 0x7);
-	pr_info(CVP_DBG_TAG "cvp (eva) powered on\n", "pwr");
+	pr_info_ratelimited(CVP_DBG_TAG "cvp (eva) powered on\n", "pwr");
 	return 0;
 
 fail_enable_core:
@@ -4229,7 +4229,7 @@ static void power_off_iris2(struct iris_hfi_device *device)
 
 	/*Do not access registers after this point!*/
 	device->power_enabled = false;
-	pr_info(CVP_DBG_TAG "cvp (eva) power collapsed\n", "pwr");
+	pr_info_ratelimited(CVP_DBG_TAG "cvp (eva) power collapsed\n", "pwr");
 }
 
 static inline int __resume(struct iris_hfi_device *device)

+ 1 - 1
msm/eva/msm_cvp.c

@@ -1197,7 +1197,7 @@ static int msm_cvp_session_stop(struct msm_cvp_inst *inst,
 	}
 	sq->state = QUEUE_STOP;
 
-	pr_info(CVP_DBG_TAG "Stop session: %pK session_id = %d\n",
+	pr_info_ratelimited(CVP_DBG_TAG "Stop session: %pK session_id = %d\n",
 		"sess", inst, hash32_ptr(inst->session));
 	spin_unlock(&sq->lock);
 

+ 4 - 2
msm/eva/msm_cvp_core.c

@@ -168,7 +168,8 @@ void *msm_cvp_open(int core_id, int session_type)
 		goto err_invalid_core;
 	}
 
-	pr_info(CVP_DBG_TAG "Opening cvp instance: %pK\n", "sess", inst);
+	pr_info_ratelimited(
+		CVP_DBG_TAG "Opening cvp instance: %pK\n", "sess", inst);
 	mutex_init(&inst->sync_lock);
 	mutex_init(&inst->lock);
 	spin_lock_init(&inst->event_handler.lock);
@@ -384,7 +385,8 @@ int msm_cvp_destroy(struct msm_cvp_inst *inst)
 	__deinit_fence_queue(inst);
 	core->synx_ftbl->cvp_sess_deinit_synx(inst);
 
-	pr_info(CVP_DBG_TAG "Closed cvp instance: %pK session_id = %d\n",
+	pr_info_ratelimited(
+		CVP_DBG_TAG "Closed cvp instance: %pK session_id = %d\n",
 		"sess", inst, hash32_ptr(inst->session));
 	inst->session = (void *)0xdeadbeef;
 	kfree(inst);

+ 1 - 1
msm/eva/msm_cvp_debug.h

@@ -72,7 +72,7 @@ extern int msm_cvp_minidump_enable;
 	do { \
 		if (msm_cvp_debug & __level) { \
 			if (msm_cvp_debug_out == CVP_OUT_PRINTK) { \
-				pr_info(CVP_DBG_TAG __fmt, \
+				pr_info_ratelimited(CVP_DBG_TAG __fmt, \
 					get_debug_level_str(__level),	\
 					## arg); \
 			} \