rk30 hdmi:
authorZheng Yang <zhengyang@rock-chips.com>
Tue, 17 Apr 2012 10:13:18 +0000 (18:13 +0800)
committerZheng Yang <zhengyang@rock-chips.com>
Tue, 17 Apr 2012 10:13:18 +0000 (18:13 +0800)
1. modified according to fb commit 237ef417c9ff2fe9e22d4c442494db791fe2c3d7.
2. rk30_sdk_defconfig support hdmi.

arch/arm/configs/rk30_sdk_defconfig
drivers/video/rockchip/hdmi/rk30_hdmi_lcdc.c

index 7dfdf86da574d9553d55046610fb50ffaa48bffe..38d41bb54f021b3f52cfcc24024a817395c8929d 100644 (file)
@@ -277,6 +277,7 @@ CONFIG_DISPLAY_SUPPORT=y
 CONFIG_LCD_B101EW05=y
 CONFIG_FB_ROCKCHIP=y
 CONFIG_LCDC_RK30=y
+CONFIG_HDMI_RK30=y
 CONFIG_RGA_RK30=y
 CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
index ac97b46d5494751cc2dddf472137aeda6af3f87b..37dda19f51ef81b26cba71bce096c86c69060886 100755 (executable)
@@ -486,9 +486,6 @@ const char *hdmi_get_video_mode_name(unsigned char vic)
 int hdmi_switch_fb(struct hdmi *hdmi, int vic)
 {
        int rc = 0;
-       struct layer_par *par = NULL;
-       struct rk_lcdc_device_driver * dev_drv;
-       struct rk29fb_screen *screen; 
 
        if(hdmi->vic == 0)
                hdmi->vic = HDMI_VIDEO_DEFAULT_MODE;
@@ -498,18 +495,10 @@ int hdmi_switch_fb(struct hdmi *hdmi, int vic)
                return -1;
        }
 
-       dev_drv = hdmi->lcdc;
-       screen = dev_drv->screen;
        rc = hdmi_set_info(hdmi->lcdc->screen, vic);
 
-       if(rc == 0 &&  hdmi->lcdc->load_screen) {
-               
-               hdmi->lcdc->load_screen(hdmi->lcdc, 0);
-               par = dev_drv->layer_par[1];
-               par->xsize = screen->x_res;
-       par->ysize = screen->y_res;
-               hdmi->lcdc->set_par(hdmi->lcdc, 1);
-               hdmi->lcdc->pan_display(hdmi->lcdc, 1);
+       if(rc == 0) {           
+               rk_fb_switch_screen(hdmi->lcdc->screen, 1, HDMI_SOURCE_DEFAULT);
        }
        return rc;
 }
@@ -522,5 +511,8 @@ int hdmi_switch_fb(struct hdmi *hdmi, int vic)
  */
 int hdmi_get_hotplug(void)
 {
-       return hdmi->hotplug;
+       if(hdmi)
+               return hdmi->hotplug;
+       else
+               return HDMI_HPD_REMOVED;
 }
\ No newline at end of file