video: tegra20: dc: get DSI/HDMI clock parent if internal DSI/HDMI is used
authorSvyatoslav Ryhel <clamor95@gmail.com>
Sun, 23 Feb 2025 09:27:09 +0000 (11:27 +0200)
committerSvyatoslav Ryhel <clamor95@gmail.com>
Thu, 13 Mar 2025 17:13:17 +0000 (19:13 +0200)
If device uses native Tegra DSI or HDMI, DC clock MUST use the same
parent as DSI/HDMI clock uses. Hence remove need in device tree
configuration and satisfy this condition by default.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
drivers/video/tegra20/tegra-dc.c

index 775043b..904d0d2 100644 (file)
@@ -524,6 +524,13 @@ exit:
                return ret;
        }
 
+       priv->clk_parent = devm_clk_get(priv->bridge, "parent");
+       if (IS_ERR(priv->clk_parent)) {
+               log_debug("%s: Could not get DC clock parent from DSI/HDMI: %ld\n",
+                         __func__, PTR_ERR(priv->clk_parent));
+               return PTR_ERR(priv->clk_parent);
+       }
+
        dc_plat = dev_get_plat(priv->bridge);
 
        /* Fill the platform data for internal devices */