]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: video: Use ofnode_decode_display_timing() to parse timing
authorKever Yang <kever.yang@rock-chips.com>
Wed, 19 Feb 2020 01:45:37 +0000 (09:45 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Tue, 28 Apr 2020 10:05:08 +0000 (18:05 +0800)
Use ofnode_decode_display_timing() instead of
fdtdec_decode_display_timing() to parse display timing, so that we can
support live DT.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/video/rockchip/rk_lvds.c
drivers/video/rockchip/rk_mipi.c

index 79e24baf53bd6459bd702d3ffea2e43258fc148b..404af7eb6e88bd44dbd0b502959a6756d5667722 100644 (file)
@@ -161,8 +161,7 @@ int rk_lvds_enable(struct udevice *dev, int panel_bpp,
 
 int rk_lvds_read_timing(struct udevice *dev, struct display_timing *timing)
 {
-       if (fdtdec_decode_display_timing
-           (gd->fdt_blob, dev_of_offset(dev), 0, timing)) {
+       if (ofnode_decode_display_timing(dev_ofnode(dev), 0, timing)) {
                debug("%s: Failed to decode display timing\n", __func__);
                return -EINVAL;
        }
index f9280e860705a65c5dd646cdab6deaa1e98dce02..a77bdfd24ddacf0d67cd2fdb9d27b364caf0d9ec 100644 (file)
@@ -29,8 +29,7 @@ int rk_mipi_read_timing(struct udevice *dev,
 {
        int ret;
 
-       ret = fdtdec_decode_display_timing(gd->fdt_blob, dev_of_offset(dev),
-                                        0, timing);
+       ret = ofnode_decode_display_timing(dev_ofnode(dev), 0, timing);
        if (ret) {
                debug("%s: Failed to decode display timing (ret=%d)\n",
                      __func__, ret);