cec: remove func that may cause deadlock [1/1]

PD#SWPL-5836

Problem:
kernel panic when read cec reg

Solution:
remove func that might cause sleep in spinlock,
so as to avoid deadlock

Verify:
S805X-P241

Change-Id: I8394f69bdbeff6673c795a221c08ef76164c5bdb
Signed-off-by: Hang Cheng <hang.cheng@amlogic.com>
Signed-off-by: Luan Yuan <luan.yuan@amlogic.com>
This commit is contained in:
Hang Cheng
2019-03-25 19:05:54 +08:00
committed by Luan Yuan
parent dadba88db1
commit 16c23afb74
2 changed files with 1 additions and 6 deletions

View File

@@ -221,15 +221,10 @@ unsigned int waiting_aocec_free(unsigned int r)
{
unsigned int cnt = 0;
int ret = true;
char *s;
while (readl(cec_dev->cec_reg + r) & (1<<23)) {
if (cnt++ >= 3500) {
pr_info("waiting aocec %x free time out %d\n", r, cnt);
s = kmalloc(2048, GFP_KERNEL);
dump_cecrx_reg(s);
CEC_ERR("%s\n", s);
kfree(s);
if (cec_dev->proble_finish)
cec_hw_reset(CEC_A);
ret = false;

View File

@@ -19,7 +19,7 @@
#define __AO_CEC_H__
#define CEC_DRIVER_VERSION "Ver 2019/3/23\n"
#define CEC_DRIVER_VERSION "Ver 2019/3/25\n"
#define CEC_FRAME_DELAY msecs_to_jiffies(400)
#define CEC_DEV_NAME "cec"