summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIcenowy Zheng <icenowy@aosc.io>2017-11-01 14:18:06 (GMT)
committerJagan Teki <jagan@amarulasolutions.com>2017-11-06 08:13:28 (GMT)
commit460b15adc9baab3dd403191b14c34647a24c1fcc (patch)
tree183c3438a555bb1cc649eea0484a9264af36577c /drivers
parent43ede0bca7fc1590b623832b743213b818257a27 (diff)
downloadu-boot-460b15adc9baab3dd403191b14c34647a24c1fcc.tar.xz
video: sunxi: de2: fix SimpleFB node creation when HDMI not initialized
When HDMI is not initialized (e.g. no monitor is plugged), the current SimpleFB code will still create a broken SimpleFB node. Detect whether HDMI is initialized when creating SimpleFB node. Fixes: be5b96f0e411 ("sunxi: setup simplefb for Allwinner DE2") Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Jagan Teki <jagan@openedev.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/sunxi/sunxi_de2.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c
index e890340..6d6bb2e 100644
--- a/drivers/video/sunxi/sunxi_de2.c
+++ b/drivers/video/sunxi/sunxi_de2.c
@@ -346,13 +346,19 @@ int sunxi_simplefb_setup(void *blob)
"sunxi_dw_hdmi", &hdmi);
if (ret) {
debug("HDMI not present\n");
- return 0;
+ } else if (device_active(hdmi)) {
+ if (mux == 0)
+ pipeline = "mixer0-lcd0-hdmi";
+ else
+ pipeline = "mixer1-lcd1-hdmi";
+ } else {
+ debug("HDMI present but not probed\n");
}
- if (mux == 0)
- pipeline = "mixer0-lcd0-hdmi";
- else
- pipeline = "mixer1-lcd1-hdmi";
+ if (!pipeline) {
+ debug("No active display present\n");
+ return 0;
+ }
de2_priv = dev_get_uclass_priv(de2);
de2_plat = dev_get_uclass_platdata(de2);