From: Zheng Yang Date: Wed, 2 Sep 2015 10:13:42 +0000 (+0800) Subject: video: rockchip: hdmi: introduce vic flag HDMI_UBOOT_NOT_INIT X-Git-Tag: firefly_0821_release~3805 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=468345a5026c858f295dedfc5644c8b63a5948c8;p=firefly-linux-kernel-4.4.55.git video: rockchip: hdmi: introduce vic flag HDMI_UBOOT_NOT_INIT If uboot_vic has HDMI_UBOOT_NOT_INIT flag, it means uboot just pass the preset vic value, registers has not been set in uboot. If not, hdmi has been power up in uboot, should not operate phy register again. Change-Id: I64f48bd878ec124a94f25a752a74dc9bae502b2b Signed-off-by: Zheng Yang --- diff --git a/drivers/video/rockchip/hdmi/rockchip-hdmi-core.c b/drivers/video/rockchip/hdmi/rockchip-hdmi-core.c index 286fdec3a998..85f7954734c3 100644 --- a/drivers/video/rockchip/hdmi/rockchip-hdmi-core.c +++ b/drivers/video/rockchip/hdmi/rockchip-hdmi-core.c @@ -485,8 +485,11 @@ struct hdmi *rockchip_hdmi_register(struct hdmi_property *property, hdmi->hotplug = HDMI_HPD_REMOVED; hdmi->autoset = HDMI_AUTO_CONFIG; if (uboot_vic > 0) { - hdmi->vic = uboot_vic; - hdmi->uboot = 1; + hdmi->vic = uboot_vic & HDMI_UBOOT_VIC_MASK; + if (uboot_vic & HDMI_UBOOT_NOT_INIT) + hdmi->uboot = 0; + else + hdmi->uboot = 1; hdmi->autoset = 0; } else if (hdmi->autoset) { hdmi->vic = 0; diff --git a/drivers/video/rockchip/hdmi/rockchip-hdmi.h b/drivers/video/rockchip/hdmi/rockchip-hdmi.h index c9ddfda57eff..7e319aed7858 100644 --- a/drivers/video/rockchip/hdmi/rockchip-hdmi.h +++ b/drivers/video/rockchip/hdmi/rockchip-hdmi.h @@ -17,6 +17,9 @@ #define HDMI_TYPE_MASK (0xFF << 8) #define HDMI_MAX_ID 4 +#define HDMI_UBOOT_NOT_INIT (1 << 16) +#define HDMI_UBOOT_VIC_MASK 0xFFFF + /* HDMI video information code according CEA-861-F */ enum hdmi_video_infomation_code { HDMI_640X480P_60HZ = 1,