rk3288 hdmi: fix some tv have no display if switch resolution several times
authorzwl <zwl@rockchips.com>
Thu, 26 Jun 2014 03:33:24 +0000 (11:33 +0800)
committerzwl <zwl@rockchips.com>
Thu, 26 Jun 2014 03:33:42 +0000 (11:33 +0800)
drivers/video/rockchip/hdmi/chips/rk3288/rk3288_hdmi_hw.c
drivers/video/rockchip/hdmi/rk_hdmi_task.c

index 6a1e0da8cd52de9eb5d3faabb9045c898c663325..35c28d93dbdac50c588ba0b27cddda1590cb85ab 100644 (file)
@@ -63,7 +63,7 @@ static void rk3288_hdmi_set_pwr_mode(struct hdmi *hdmi_drv, int mode)
        if (hdmi_drv->pwr_mode == mode)
                return;
 
-       dev_printk(KERN_INFO, hdmi_drv->dev, "%s change pwr_mode %d --> %d\n",
+       hdmi_dbg(hdmi_drv->dev, "%s change pwr_mode %d --> %d\n",
                   __func__, hdmi_drv->pwr_mode, mode);
 
        switch (mode) {
@@ -1045,8 +1045,6 @@ static int rk3288_hdmi_video_csc(struct hdmi *hdmi_drv,
 int rk3288_hdmi_config_video(struct hdmi *hdmi_drv,
                             struct hdmi_video_para *vpara)
 {
-       rk3288_hdmi_av_mute(hdmi_drv, 1);
-
        if (rk3288_hdmi_video_forceOutput(hdmi_drv, 1) < 0)
                return -1;
        if (rk3288_hdmi_video_frameComposer(hdmi_drv, vpara) < 0)
@@ -1293,6 +1291,7 @@ void rk3288_hdmi_control_output(struct hdmi *hdmi_drv, int enable)
        hdmi_dbg(hdmi_drv->dev, "[%s] %d\n", __func__, enable);
        if (enable == 0) {
                rk3288_hdmi_av_mute(hdmi_drv, 1);
+               rk3288_hdmi_set_pwr_mode(hdmi_drv, LOWER_PWR);
        } else {
                if (hdmi_drv->pwr_mode == LOWER_PWR)
                        rk3288_hdmi_set_pwr_mode(hdmi_drv, NORMAL);
@@ -1318,7 +1317,7 @@ int rk3288_hdmi_insert(struct hdmi *hdmi_drv)
 
 int rk3288_hdmi_removed(struct hdmi *hdmi_drv)
 {
-       rk3288_hdmi_set_pwr_mode(hdmi_drv, LOWER_PWR);
+       rk3288_hdmi_control_output(hdmi_drv, 0);
        dev_printk(KERN_INFO, hdmi_drv->dev, "Removed.\n");
        return 0;
 }
index c38e54363ca0207f691c557945060fb57c7664de..94d8260e6c035215ca9043e66cef6ba654571b60 100755 (executable)
@@ -235,9 +235,9 @@ void hdmi_work(struct work_struct *work)
                        }
                        break;
                case SYSTEM_CONFIG:
-#ifdef CONFIG_HDMI_RK616
-                       hdmi->remove(hdmi);
-#endif
+                       if (hdmi->remove)
+                               hdmi->remove(hdmi);
+
                        if (hdmi->autoconfig)
                                hdmi->vic = hdmi_find_best_mode(hdmi, 0);
                        else