mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
Decrease the log of register panel notifier
Decrease the log of register panel notifier and print the log every 1s when not find matched display panel. Change-Id: Iab2f4f7accc4bc9de5722e2d0f03255ad6b764e9 Signed-off-by: Wenge Zhu <zhuwg1@motorola.com> Reviewed-on: https://gerrit.mot.com/2354041 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jichao Zou <zoujc@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
9910ab9139
commit
d5d96acec4
2 changed files with 9 additions and 4 deletions
|
|
@ -342,6 +342,9 @@ static void ts_mmi_worker_func(struct work_struct *w)
|
|||
struct ts_mmi_dev *touch_cdev =
|
||||
container_of(dw, struct ts_mmi_dev, work);
|
||||
int ret, cmd = 0;
|
||||
#if defined (CONFIG_DRM_PANEL_NOTIFICATIONS) || defined (CONFIG_DRM_PANEL_EVENT_NOTIFICATIONS)
|
||||
static DEFINE_RATELIMIT_STATE(register_panel, HZ, 1);
|
||||
#endif
|
||||
|
||||
while (kfifo_get(&touch_cdev->cmd_pipe, &cmd)) {
|
||||
switch (cmd) {
|
||||
|
|
@ -383,7 +386,9 @@ static void ts_mmi_worker_func(struct work_struct *w)
|
|||
#if defined (CONFIG_DRM_PANEL_NOTIFICATIONS) || defined (CONFIG_DRM_PANEL_EVENT_NOTIFICATIONS)
|
||||
ret = ts_mmi_check_drm_panel(touch_cdev, DEV_TS->of_node);
|
||||
if (ret < 0) {
|
||||
dev_err(DEV_TS, "%s: check drm panel failed. %d\n", __func__, ret);
|
||||
/* 1 error message for every 1 sec */
|
||||
if (__ratelimit(®ister_panel))
|
||||
dev_err(DEV_TS, "%s: check drm panel failed. %d\n", __func__, ret);
|
||||
touch_cdev->panel_status = -1;
|
||||
} else
|
||||
touch_cdev->panel_status = 0;
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ static int ts_mmi_check_dt(struct ts_mmi_dev *touch_cdev, struct device_node *np
|
|||
|
||||
count = of_count_phandle_with_args(np, "panel", NULL);
|
||||
if (count <= 0) {
|
||||
dev_err(DEV_TS, "%s: find drm_panel count(%d) fail", __func__, count);
|
||||
dev_dbg(DEV_TS, "%s: find drm_panel count(%d) fail", __func__, count);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
@ -282,7 +282,7 @@ static int ts_mmi_check_dt(struct ts_mmi_dev *touch_cdev, struct device_node *np
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
dev_err(DEV_TS, "%s: No find drm_panel", __func__);
|
||||
dev_dbg(DEV_TS, "%s: No find drm_panel", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
@ -337,7 +337,7 @@ int ts_mmi_check_drm_panel(struct ts_mmi_dev* touch_cdev, struct device_node *of
|
|||
|
||||
ret = ts_mmi_check_dt(touch_cdev, of_node);
|
||||
if (ret) {
|
||||
dev_err(DEV_TS, "%s: parse drm-panel fail\n", __func__);
|
||||
dev_dbg(DEV_TS, "%s: parse drm-panel fail\n", __func__);
|
||||
if (!ts_mmi_check_default_tp(of_node, "qcom,mmi-touch-active"))
|
||||
ret = -EPROBE_DEFER;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue