mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
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:
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user