hdmi: pkt: pktfifo not work after switch src
authorYong Qin <yong.qin@amlogic.com>
Mon, 20 Aug 2018 08:58:04 +0000 (16:58 +0800)
committerYong Qin <yong.qin@amlogic.com>
Tue, 21 Aug 2018 03:26:58 +0000 (11:26 +0800)
PD#172097: hdmi: pktfifo not work after switch src

1.pktinfo not work when exit hdmi source and re-enter
hdmi source.

Change-Id: I51f08529f38e93158e5c52a686472c5c3577e66b
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.h

index 13988f3..3827547 100644 (file)
@@ -34,7 +34,7 @@
 #include "hdmi_rx_edid.h"
 
 
-#define RX_VER0 "ver.2018-07-30"
+#define RX_VER0 "ver.2018-08-20"
 /*
  *
  *
index 71b56ed..9f3108f 100644 (file)
@@ -246,6 +246,10 @@ void rx_tasklet_handler(unsigned long arg)
        if (irq_flag & IRQ_PACKET_FLAG)
                rx_pkt_handler(PKT_BUFF_SET_FIFO);
 
+       /*pkt overflow or underflow*/
+       if (irq_flag & IRQ_PACKET_ERR)
+               hdmirx_packet_fifo_rst();
+
        if (irq_flag & IRQ_AUD_FLAG)
                hdmirx_audio_fifo_rst();
 
@@ -415,12 +419,14 @@ static int hdmi_rx_ctrl_irq_handler(void)
                if (rx_get_bits(intr_pedc, PD_FIFO_OVERFL) != 0) {
                        if (log_level & 0x200)
                                rx_pr("[irq] PD_FIFO_OVERFL\n");
-                       rx.irq_flag |= IRQ_PACKET_FLAG;
+                       rx.irq_flag |= IRQ_PACKET_ERR;
+                       /*hdmirx_packet_fifo_rst();*/
                }
                if (rx_get_bits(intr_pedc, PD_FIFO_UNDERFL) != 0) {
                        if (log_level & 0x200)
                                rx_pr("[irq] PD_FIFO_UNDFLOW\n");
-                       rx.irq_flag |= IRQ_PACKET_FLAG;
+                       rx.irq_flag |= IRQ_PACKET_ERR;
+                       /*hdmirx_packet_fifo_rst();*/
                }
        }
 
index e7f318f..acb3a0d 100644 (file)
@@ -75,6 +75,7 @@ enum err_code_e {
 enum irq_flag_e {
        IRQ_AUD_FLAG = 0x01,
        IRQ_PACKET_FLAG = 0x02,
+       IRQ_PACKET_ERR = 0x04,
 };
 
 enum hdcp22_auth_state_e {