rk32 lcdc and hdmi: add report rk system status
authorzwl <zwl@rockchips.com>
Tue, 27 May 2014 09:03:50 +0000 (17:03 +0800)
committerzwl <zwl@rockchips.com>
Tue, 27 May 2014 09:04:07 +0000 (17:04 +0800)
drivers/video/rockchip/hdmi/rk_hdmi_task.c
drivers/video/rockchip/lcdc/rk3288_lcdc.c

index fecf87d254566e9d6f466b5de552a7d7a1dc71e5..7434d56258ca1b76cefe19680b7a391342d40b85 100755 (executable)
@@ -1,6 +1,8 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
+#include <linux/rockchip/common.h>
+#include <dt-bindings/clock/rk_system_status.h>
 #include "rk_hdmi.h"
 
 #define HDMI_MAX_TRY_TIMES     1
@@ -90,6 +92,7 @@ void hdmi_sys_remove(struct hdmi *hdmi)
        if(audio_need)
                switch_set_state(&(hdmi->switch_hdmi), 0);
        #endif
+       rockchip_clear_system_status(SYS_STATUS_HDMI);
 }
 
 static void hdmi_sys_sleep(struct hdmi *hdmi)
@@ -233,6 +236,7 @@ void hdmi_work(struct work_struct *work)
                                        if(hdmi->edid.base_audio_support == 1 &&  hdmi->edid.sink_hdmi == 1)
                                                switch_set_state(&(hdmi->switch_hdmi), 1);
                                        #endif
+                                       rockchip_set_system_status(SYS_STATUS_HDMI);
                                }
                                break;
                        case SYSTEM_CONFIG:
index dd72111ecfc3a3e52a498de51f0bcd0f858e569c..7fbd4c72305e41d12888848b264237f460cf352f 100755 (executable)
@@ -31,6 +31,8 @@
 #include <linux/rockchip/cpu.h>
 #include <linux/rockchip/iomap.h>
 #include <linux/rockchip/grf.h>
+#include <linux/rockchip/common.h>
+#include <dt-bindings/clock/rk_system_status.h>
 
 #include "rk3288_lcdc.h"
 
@@ -1288,9 +1290,12 @@ static int rk3288_lcdc_open(struct rk_lcdc_driver *dev_drv, int win_id,
 {
        struct lcdc_device *lcdc_dev = container_of(dev_drv,
                                        struct lcdc_device, driver);
+       int sys_status = (dev_drv->id == 0) ?
+                       SYS_STATUS_LCDC0 : SYS_STATUS_LCDC1;
 
        /*enable clk,when first layer open */
        if ((open) && (!lcdc_dev->atv_layer_cnt)) {
+               rockchip_set_system_status(sys_status);
                rk3288_lcdc_pre_init(dev_drv);
                rk3288_lcdc_clk_enable(lcdc_dev);
                rk3288_lcdc_reg_restore(lcdc_dev);
@@ -1324,6 +1329,7 @@ static int rk3288_lcdc_open(struct rk_lcdc_driver *dev_drv, int win_id,
                rk3288_lcdc_disable_irq(lcdc_dev);
                rk3288_lcdc_reg_update(dev_drv);
                rk3288_lcdc_clk_disable(lcdc_dev);
+               rockchip_clear_system_status(sys_status);
        }
 
        return 0;