hdmitx: add delay for plugout

PD#157869: hdmitx: add delay for plugout

1. add delay for plugout and ignore plugout work when boot.
2. delete set display when plugin.

Change-Id: I21fee9d3f68dc5fe84bcd76efc0a8572e3976ef6
Signed-off-by: Kaifu Hu <kaifu.hu@amlogic.com>
This commit is contained in:
Kaifu Hu
2018-01-24 16:14:14 +08:00
committed by Jianxin Pan
parent 827be37207
commit f8043428e5
4 changed files with 6 additions and 15 deletions

View File

@@ -68,7 +68,6 @@
static struct class *hdmitx_class;
static int set_disp_mode_auto(void);
struct vinfo_s *hdmi_get_current_vinfo(void);
static void hdmitx_get_edid(struct hdmitx_dev *hdev);
static void hdmitx_set_drm_pkt(struct master_display_info_s *data);
static void hdmitx_set_vsif_pkt(enum eotf_type type, uint8_t tunnel_mode);
@@ -111,7 +110,7 @@ static inline void hdmitx_notify_hpd(int hpd)
#include <linux/amlogic/pm.h>
static void hdmitx_early_suspend(struct early_suspend *h)
{
const struct vinfo_s *info = hdmi_get_current_vinfo();
const struct vinfo_s *info = hdmitx_get_current_vinfo();
struct hdmitx_dev *phdmi = (struct hdmitx_dev *)h->param;
if (info && (strncmp(info->name, "panel", 5) == 0
@@ -146,7 +145,7 @@ static int hdmitx_is_hdmi_vmode(char *mode_name)
static void hdmitx_late_resume(struct early_suspend *h)
{
const struct vinfo_s *info = hdmi_get_current_vinfo();
const struct vinfo_s *info = hdmitx_get_current_vinfo();
struct hdmitx_dev *phdmi = (struct hdmitx_dev *)h->param;
if (info && (strncmp(info->name, "panel", 5) == 0 ||
@@ -223,14 +222,6 @@ int get_cur_vout_index(void)
return vout_index;
}
struct vinfo_s *hdmi_get_current_vinfo(void)
{
struct vinfo_s *info;
info = get_current_vinfo();
return info;
}
static int set_disp_mode(const char *mode)
{
int ret = -1;
@@ -2417,6 +2408,7 @@ static int hdmitx_module_disable(enum vmode_e cur_vmod)
hdev->HWOp.CntlConfig(hdev, CONF_CLR_VSDB_PACKET, 0);
hdev->HWOp.CntlMisc(hdev, MISC_TMDS_PHY_OP, TMDS_PHY_DISABLE);
hdev->para = hdmi_get_fmt_name("invalid", hdev->fmt_attr);
hdmitx_validate_vmode("null");
return 0;
}
@@ -2664,7 +2656,7 @@ static void hdmitx_hpd_plugin_handler(struct work_struct *work)
(unsigned long int)bksv_buf);
rx_set_receive_hdcp(bksv_buf, 1, 1, 0, 0);
}
set_disp_mode_auto();
hdmitx_set_audio(hdev, &(hdev->cur_audio_param));
hdev->hpd_state = 1;
hdmitx_notify_hpd(hdev->hpd_state);

View File

@@ -652,7 +652,7 @@ static irqreturn_t intr_handler(int irq, void *dev)
hdev->hdmitx_event |= HDMI_TX_HPD_PLUGOUT;
hdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGIN;
queue_delayed_work(hdev->hdmi_wq,
&hdev->work_hpd_plugout, HZ / 50);
&hdev->work_hpd_plugout, HZ / 20);
}
next:
/* internal interrupt */

View File

@@ -38,7 +38,7 @@
/* For gxb/gxl/gxm */
static struct reg_map reg_maps_def[] = {
[CBUS_REG_IDX] = { /* CBUS */
.phy_addr = 0xc1100000,
.phy_addr = 0xc1109800,
.size = 0xa00000,
},
[PERIPHS_REG_IDX] = { /* PERIPHS */

View File

@@ -597,7 +597,6 @@ static inline int hdmitx_event_notifier_unregist(struct notifier_block *nb)
extern void hdmi_set_audio_para(int para);
extern int get_cur_vout_index(void);
extern struct vinfo_s *hdmi_get_current_vinfo(void);
extern void phy_pll_off(void);
extern int get_hpd_state(void);
extern void hdmitx_hdcp_do_work(struct hdmitx_dev *hdev);