diff mbox series

[1/2] rockchip: video: Use ofnode_decode_display_timing() to parse timing

Message ID 20200219014538.18366-1-kever.yang@rock-chips.com
State Superseded
Headers show
Series [1/2] rockchip: video: Use ofnode_decode_display_timing() to parse timing | expand

Commit Message

Kever Yang Feb. 19, 2020, 1:45 a.m. UTC
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 at rock-chips.com>
---

 drivers/video/rockchip/rk_lvds.c | 3 +--
 drivers/video/rockchip/rk_mipi.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

Comments

Simon Glass Feb. 20, 2020, 3:04 a.m. UTC | #1
On Tue, 18 Feb 2020 at 18:45, Kever Yang <kever.yang at rock-chips.com> wrote:
>
> 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 at rock-chips.com>
> ---
>
>  drivers/video/rockchip/rk_lvds.c | 3 +--
>  drivers/video/rockchip/rk_mipi.c | 3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>
diff mbox series

Patch

diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c
index cf5c0439b1..cae8bada32 100644
--- a/drivers/video/rockchip/rk_lvds.c
+++ b/drivers/video/rockchip/rk_lvds.c
@@ -160,8 +160,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;
 	}
diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_mipi.c
index f9280e8607..a77bdfd24d 100644
--- a/drivers/video/rockchip/rk_mipi.c
+++ b/drivers/video/rockchip/rk_mipi.c
@@ -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);