decoder: Pip switching channel cause crash probably [1/1]
authormiaohong chen <miaohong.chen@amlogic.com>
Wed, 6 Jan 2021 09:15:43 +0000 (17:15 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Wed, 6 Jan 2021 11:54:37 +0000 (03:54 -0800)
PD#SWPL-40600

Problem:
When pip switching channel, upper layer call poll by mistake.

Solution:
Disable polling, when not in FCC.

Verify:
AH212

Change-Id: I2d9a86f165f90d4da9a3ceec334181d1b735ba36
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
drivers/stream_input/amports/amstream.c

index 73857da800545b328a9fbca1af93ab5cc7677d40..85b31ec215431bfbdebb5c3c0063a25ee1272625 100644 (file)
@@ -1664,6 +1664,9 @@ static unsigned int amstream_offset_poll(struct file *file,
        int fd_match = 0;
        int i;
 
+       if ((fcc_enable & 1) == 0)
+               return 0;
+
        poll_wait(file, &fcc.offset_wait, wait_table);
        mutex_lock(&fcc.mutex);
        for (i = 0; i < MAX_FCC_CHANNEL_NUM; i++) {