From: hjc Date: Sat, 12 Jul 2014 06:04:44 +0000 (+0800) Subject: rk3036 hdmi: hdmi display ok X-Git-Tag: firefly_0821_release~4916^2~258 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=422b8701e27ee29f89c59f229c1c56dc4af4a0bb;p=firefly-linux-kernel-4.4.55.git rk3036 hdmi: hdmi display ok --- diff --git a/arch/arm/boot/dts/rk3036-rk88.dts b/arch/arm/boot/dts/rk3036-rk88.dts index a4e063ddf16b..56d2c9b2ba0d 100755 --- a/arch/arm/boot/dts/rk3036-rk88.dts +++ b/arch/arm/boot/dts/rk3036-rk88.dts @@ -128,3 +128,20 @@ dma-names = "!tx", "!rx"; //pinctrl-0 = <&uart0_xfer &uart0_cts>; }; + +&rk_screen { + display-timings = <&disp_timings>; +}; + +&lcdc { + status = "okay"; +}; + +&tve { + status = "disabled"; +}; + +&hdmi { + status = "okay"; + //rockchips,hdmi_audio_source = <0>; +}; diff --git a/arch/arm/boot/dts/rk3036-sdk.dts b/arch/arm/boot/dts/rk3036-sdk.dts index 52e4b1356b36..201e15a1d684 100755 --- a/arch/arm/boot/dts/rk3036-sdk.dts +++ b/arch/arm/boot/dts/rk3036-sdk.dts @@ -161,5 +161,10 @@ }; &tve { + status = "disabled"; +}; + +&hdmi { status = "okay"; + //rockchips,hdmi_audio_source = <0>; }; diff --git a/arch/arm/configs/rk3036_defconfig b/arch/arm/configs/rk3036_defconfig index cc3230499082..d9a48044e96f 100644 --- a/arch/arm/configs/rk3036_defconfig +++ b/arch/arm/configs/rk3036_defconfig @@ -5,7 +5,6 @@ CONFIG_AUDIT=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y CONFIG_RCU_FAST_NO_HZ=y -CONFIG_LOG_BUF_SHIFT=17 CONFIG_CGROUPS=y CONFIG_CGROUP_DEBUG=y CONFIG_CGROUP_FREEZER=y @@ -355,6 +354,7 @@ CONFIG_BACKLIGHT_PWM=y CONFIG_FB_ROCKCHIP=y CONFIG_LCDC_RK3188=y CONFIG_LCDC_RK3288=y +CONFIG_LCDC_RK3036=y CONFIG_RK_TRSM=y CONFIG_RK32_LVDS=y CONFIG_DP_ANX6345=y diff --git a/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.c b/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.c index 83bd233b8ac7..c58dec98908d 100755 --- a/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.c +++ b/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.c @@ -249,7 +249,7 @@ static void __maybe_unused rk616_irq_work_func(struct work_struct *work) dev_info(hdmi_drv->dev, "func: %s, enable_irq\n", __func__); enable_irq(hdmi_drv->irq); } - +#if 0 static irqreturn_t rk616_hdmi_irq(int irq, void *dev_id) { struct work_struct *rk616_irq_work_struct; @@ -271,7 +271,7 @@ static irqreturn_t rk616_hdmi_irq(int irq, void *dev_id) } return IRQ_HANDLED; } - +#endif static int rk616_hdmi_drv_init(struct hdmi *hdmi_drv) { int ret = 0; @@ -288,10 +288,12 @@ static int rk616_hdmi_drv_init(struct hdmi *hdmi_drv) grf_writel(HDMI_SEL_LCDC(lcdc_id), RK3036_GRF_SOC_CON6); #endif */ + lcdc_id = 0; if (lcdc_id == 0) hdmi_drv->lcdc = rk_get_lcdc_drv("lcdc0"); else hdmi_drv->lcdc = rk_get_lcdc_drv("lcdc1"); + if (IS_ERR(hdmi_drv->lcdc)) { dev_err(hdmi_drv->dev, "can not connect to video source lcdc\n"); @@ -350,9 +352,6 @@ static int rk616_hdmi_probe(struct platform_device *pdev) } #endif - if (rk616_hdmi_drv_init(hdmi_drv)) - goto err0; - #ifdef CONFIG_SWITCH hdmi_drv->switch_hdmi.name = "hdmi"; switch_dev_register(&(hdmi_drv->switch_hdmi)); @@ -399,6 +398,7 @@ static int rk616_hdmi_probe(struct platform_device *pdev) hdmi_drv->irq = 0; } else { /* request the IRQ */ + #if 0 ret = devm_request_irq(hdmi_drv->dev, hdmi_drv->irq, rk616_hdmi_irq, 0, dev_name(hdmi_drv->dev), hdmi_drv); @@ -407,6 +407,7 @@ static int rk616_hdmi_probe(struct platform_device *pdev) ret); goto err2; } + #endif } #else if (gpio_is_valid(hdmi_dev->rk616_drv->pdata->hdmi_irq)) { @@ -445,6 +446,10 @@ static int rk616_hdmi_probe(struct platform_device *pdev) } #endif + if (rk616_hdmi_drv_init(hdmi_drv)) + goto err0; + + //rk616_hdmi_work(hdmi_drv); #if defined(CONFIG_DEBUG_FS) if (hdmi_dev->rk616_drv && hdmi_dev->rk616_drv->debugfs_dir) { @@ -467,6 +472,7 @@ static int rk616_hdmi_probe(struct platform_device *pdev) queue_delayed_work(hdmi_drv->workqueue, &hdmi_dev->rk616_delay_work, msecs_to_jiffies(0)); dev_info(hdmi_drv->dev, "rk616 hdmi probe success.\n"); + return 0; #if defined(CONFIG_ARCH_RK3026) || defined(SOC_CONFIG_RK3036) diff --git a/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.c b/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.c index f94a1a02ec3c..fcc35e1a27f7 100755 --- a/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.c +++ b/drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.c @@ -118,7 +118,7 @@ static void rk616_hdmi_set_pwr_mode(struct hdmi *hdmi_drv, int mode) case NORMAL: hdmi_dbg(hdmi_drv->dev, "%s change pwr_mode NORMAL pwr_mode = %d, mode = %d\n", - __func__, hdmi->pwr_mode, mode); + __func__, hdmi_drv->pwr_mode, mode); rk616_hdmi_sys_power(hdmi_drv, false); if (!(hdmi_drv->set_vif) && (hdmi_drv->vic == HDMI_1920x1080p_60Hz @@ -149,7 +149,7 @@ static void rk616_hdmi_set_pwr_mode(struct hdmi *hdmi_drv, int mode) case LOWER_PWR: hdmi_dbg(hdmi_drv->dev, "%s change pwr_mode LOWER_PWR pwr_mode = %d, mode = %d\n", - __func__, hdmi->pwr_mode, mode); + __func__, hdmi_drv->pwr_mode, mode); rk616_hdmi_av_mute(hdmi_drv, 0); rk616_hdmi_sys_power(hdmi_drv, false); hdmi_writel(hdmi_dev, PHY_DRIVER, 0x00); @@ -419,9 +419,9 @@ static int rk616_hdmi_config_video(struct hdmi *hdmi_drv, if (vpara->output_mode == OUTPUT_HDMI) { rk616_hdmi_config_avi(hdmi_drv, vpara->vic, vpara->output_color); - hdmi_dbg(hdmi->dev, "[%s] sucess output HDMI.\n", __func__); + hdmi_dbg(hdmi_drv->dev, "[%s] sucess output HDMI.\n", __func__); } else { - hdmi_dbg(hdmi->dev, "[%s] sucess output DVI.\n", __func__); + hdmi_dbg(hdmi_drv->dev, "[%s] sucess output DVI.\n", __func__); } if (hdmi_drv->set_vif) { @@ -635,7 +635,7 @@ static void rk616_hdmi_reset(struct hdmi *hdmi_drv) #else hdmi_writel(hdmi_dev, INTERRUPT_MASK1, m_INT_HOTPLUG); #endif - rk616_hdmi_set_pwr_mode(hdmi_drv, LOWER_PWR); + //rk616_hdmi_set_pwr_mode(hdmi_drv, LOWER_PWR); // hjc delete for audis } int rk616_hdmi_initial(struct hdmi *hdmi_drv)