]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/tegra: hub: Add Tegra194 support
authorThierry Reding <treding@nvidia.com>
Fri, 21 Sep 2018 10:27:43 +0000 (12:27 +0200)
committerThierry Reding <treding@nvidia.com>
Wed, 26 Sep 2018 14:04:10 +0000 (16:04 +0200)
The display hub integrated into Tegra194 is almost identical to the one
found on Tegra186. However, it doesn't support DSC (display stream
compression) so it isn't fully compatible.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/drm.c
drivers/gpu/drm/tegra/hub.c
drivers/gpu/drm/tegra/hub.h

index 9a0efcea217ae12328a74df98aca94587fedc77e..4e40ffd2b32e23a953c57d9a249393f9e34fa81f 100644 (file)
@@ -1255,6 +1255,7 @@ static const struct of_device_id host1x_drm_subdevs[] = {
        { .compatible = "nvidia,tegra186-sor", },
        { .compatible = "nvidia,tegra186-sor1", },
        { .compatible = "nvidia,tegra186-vic", },
+       { .compatible = "nvidia,tegra194-display", },
        { /* sentinel */ }
 };
 
index 8f4fcbb515fb4d16e27ed89f378993c214577efe..6112d90429799582098c01a3282fc571aa665517 100644 (file)
@@ -758,10 +758,12 @@ static int tegra_display_hub_probe(struct platform_device *pdev)
                return err;
        }
 
-       hub->clk_dsc = devm_clk_get(&pdev->dev, "dsc");
-       if (IS_ERR(hub->clk_dsc)) {
-               err = PTR_ERR(hub->clk_dsc);
-               return err;
+       if (hub->soc->supports_dsc) {
+               hub->clk_dsc = devm_clk_get(&pdev->dev, "dsc");
+               if (IS_ERR(hub->clk_dsc)) {
+                       err = PTR_ERR(hub->clk_dsc);
+                       return err;
+               }
        }
 
        hub->clk_hub = devm_clk_get(&pdev->dev, "hub");
@@ -890,10 +892,19 @@ static const struct dev_pm_ops tegra_display_hub_pm_ops = {
 
 static const struct tegra_display_hub_soc tegra186_display_hub = {
        .num_wgrps = 6,
+       .supports_dsc = true,
+};
+
+static const struct tegra_display_hub_soc tegra194_display_hub = {
+       .num_wgrps = 6,
+       .supports_dsc = false,
 };
 
 static const struct of_device_id tegra_display_hub_of_match[] = {
        {
+               .compatible = "nvidia,tegra194-display",
+               .data = &tegra194_display_hub
+       }, {
                .compatible = "nvidia,tegra186-display",
                .data = &tegra186_display_hub
        }, {
index 85b8bf41a395ac748fdeb5c48db325123fd92a29..6696a85fc1f204389f2973a6839e4eddca06a1d7 100644 (file)
@@ -38,6 +38,7 @@ to_tegra_shared_plane(struct drm_plane *plane)
 
 struct tegra_display_hub_soc {
        unsigned int num_wgrps;
+       bool supports_dsc;
 };
 
 struct tegra_display_hub {