vdin: add reset_tvin_smr.
authorxuhua zhang <xuhua.zhang@amlogic.com>
Thu, 7 Jun 2018 06:15:16 +0000 (14:15 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Thu, 14 Jun 2018 05:29:50 +0000 (22:29 -0700)
PD#167053: vdin: add reset_tvin_smr.

when cutting table, need reset tvin smr.

Change-Id: Ibe95526b696f73c0f17ff456b17cfb11afafac1b
Signed-off-by: xuhua zhang <xuhua.zhang@amlogic.com>
drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c
drivers/amlogic/media/vin/tvin/vdin/vdin_sm.c
drivers/amlogic/media/vin/tvin/vdin/vdin_sm.h

index e3057ec..76814b7 100644 (file)
@@ -1969,6 +1969,7 @@ static long vdin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                        pr_info("TVIN_IOC_STOP_DEC(%d) port %s, decode stop ok\n\n",
                                parm->index, tvin_port_str(parm->port));
                mutex_unlock(&devp->fe_lock);
+               reset_tvin_smr(parm->index);
                break;
        }
        case TVIN_IOC_VF_REG:
index 0879fb4..4e5a98c 100644 (file)
@@ -287,6 +287,11 @@ static void hdmirx_dv_check(struct vdin_dev_s *devp,
        }
 }
 
+void reset_tvin_smr(unsigned int index)
+{
+       sm_dev[index].sig_status = TVIN_SIG_STATUS_NULL;
+}
+
 /*
  * tvin state machine routine
  *
index 5b289bf..b300911 100644 (file)
@@ -51,6 +51,7 @@ struct tvin_sm_s {
 };
 void tvin_smr(struct vdin_dev_s *pdev);
 void tvin_smr_init(int index);
+void reset_tvin_smr(unsigned int index);
 
 enum tvin_sm_status_e tvin_get_sm_status(int index);