video: meson: vpu: Add fallback to default display timings from DT
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Wed, 25 Nov 2020 19:13:55 +0000 (20:13 +0100)
committerSylwester Nawrocki <s.nawrocki@samsung.com>
Tue, 1 Dec 2020 09:10:44 +0000 (10:10 +0100)
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 <s.nawrocki@samsung.com>
drivers/video/meson/meson_vpu.c

index 4868839ff7df63026941a4874ef0a87e52dcebcb..60dfc5bed48b3ca3d9c253b07c1235f01af1ada8 100644 (file)
@@ -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;