From e9e801f3d25386c52b0d77d8d9f4c491cd0ba755 Mon Sep 17 00:00:00 2001 From: Zheng Yang Date: Sat, 11 Apr 2015 17:14:07 +0800 Subject: [PATCH] HDMI: calling rk_fb_switch_screen() to close vop related to HDMI before calling switch_set_state() when HDMI is removed. For android hwcompser need to make sure vop is disabled when received hdmi removing event. Signed-off-by: Zheng Yang --- drivers/video/rockchip/hdmi/rockchip-hdmi-core.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/video/rockchip/hdmi/rockchip-hdmi-core.c b/drivers/video/rockchip/hdmi/rockchip-hdmi-core.c index ee514c3e6d9b..76d8c7ba8e07 100644 --- a/drivers/video/rockchip/hdmi/rockchip-hdmi-core.c +++ b/drivers/video/rockchip/hdmi/rockchip-hdmi-core.c @@ -241,6 +241,10 @@ static void hdmi_wq_remove(struct hdmi *hdmi) DBG("%s", __func__); if (hdmi->ops->remove) hdmi->ops->remove(hdmi); + if (hdmi->hotplug == HDMI_HPD_ACTIVED) { + screen.type = SCREEN_HDMI; + rk_fb_switch_screen(&screen, 0, hdmi->lcdc->id); + } #ifdef CONFIG_SWITCH if ((hdmi->edid.baseaudio_support && hdmi->edid.sink_hdmi) || @@ -251,9 +255,7 @@ static void hdmi_wq_remove(struct hdmi *hdmi) list_del(pos); kfree(pos); } - kfree(hdmi->edid.audio); - if (hdmi->edid.specs) { kfree(hdmi->edid.specs->modedb); kfree(hdmi->edid.specs); @@ -263,10 +265,6 @@ static void hdmi_wq_remove(struct hdmi *hdmi) hdmi->mute = HDMI_AV_UNMUTE; hdmi->mode_3d = HDMI_3D_NONE; hdmi->uboot = 0; - if (hdmi->hotplug == HDMI_HPD_ACTIVED) { - screen.type = SCREEN_HDMI; - rk_fb_switch_screen(&screen, 0, hdmi->lcdc->id); - } hdmi->hotplug = HDMI_HPD_REMOVED; hdmi_send_uevent(hdmi, KOBJ_REMOVE); } -- 2.34.1