From: Zheng Yang Date: Tue, 17 Apr 2012 10:13:18 +0000 (+0800) Subject: rk30 hdmi: X-Git-Tag: firefly_0821_release~9394 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=35db0faef7d217a10aa2d79f6179ea3591517ce8;p=firefly-linux-kernel-4.4.55.git rk30 hdmi: 1. modified according to fb commit 237ef417c9ff2fe9e22d4c442494db791fe2c3d7. 2. rk30_sdk_defconfig support hdmi. --- diff --git a/arch/arm/configs/rk30_sdk_defconfig b/arch/arm/configs/rk30_sdk_defconfig index 7dfdf86da574..38d41bb54f02 100644 --- a/arch/arm/configs/rk30_sdk_defconfig +++ b/arch/arm/configs/rk30_sdk_defconfig @@ -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 diff --git a/drivers/video/rockchip/hdmi/rk30_hdmi_lcdc.c b/drivers/video/rockchip/hdmi/rk30_hdmi_lcdc.c index ac97b46d5494..37dda19f51ef 100755 --- a/drivers/video/rockchip/hdmi/rk30_hdmi_lcdc.c +++ b/drivers/video/rockchip/hdmi/rk30_hdmi_lcdc.c @@ -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