From 43c42d1cb4569d2c2bbe13bf08ee53eba26cbb2f Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Wed, 25 Nov 2020 20:13:55 +0100 Subject: [PATCH] video: meson: vpu: Add fallback to default display timings from DT The HDMI transmitter supports only up to 1920x1080 resolutions and 4K monitors might not specify detailed timings in EDID other than for their maximum resolution, even though they work with lower resolutions like full HD. In such case display_read_timings() will fail breaking the video output driver initialization. To prevent this add a fallback to default timing as specified in DT in the vpu node. This patch allows to use 4K monitors with VIM3(L) boards. Change-Id: I84f4b33c8408d01d3463a89e5e88c91fc95742f5 Signed-off-by: Sylwester Nawrocki --- drivers/video/meson/meson_vpu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/video/meson/meson_vpu.c b/drivers/video/meson/meson_vpu.c index 4868839ff7..60dfc5bed4 100644 --- a/drivers/video/meson/meson_vpu.c +++ b/drivers/video/meson/meson_vpu.c @@ -52,8 +52,12 @@ static int meson_vpu_setup_mode(struct udevice *dev, struct udevice *disp) if (disp) { ret = display_read_timing(disp, &timing); if (ret) { - debug("%s: Failed to read timings\n", __func__); - goto cvbs; + if (ofnode_decode_display_timing(dev_ofnode(dev), + 0, &timing)) { + printf("%s: Failed to read display timings\n", + __func__); + goto cvbs; + } } uc_priv->xsize = timing.hactive.typ; -- 2.34.1