| From fed872a2c6996b7cf1de385ec68c7a40c09d62f1 Mon Sep 17 00:00:00 2001 |
| From: Thierry Reding <treding@nvidia.com> |
| Date: Wed, 24 Jul 2019 17:06:17 +0200 |
| Subject: [PATCH] drm/tegra: sor: Use correct SOR index on Tegra210 |
| |
| commit 24e64f86da40e68c5f58af08796110f147b12193 upstream. |
| |
| The device tree bindings for the Tegra210 SOR don't require the |
| controller instance to be defined, since the instance can be derived |
| from the compatible string. The index is never used on Tegra210, so we |
| got away with it not getting set. However, subsequent patches will |
| change that, so make sure the proper index is used. |
| |
| Signed-off-by: Thierry Reding <treding@nvidia.com> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c |
| index 4ffe3794e6d3..f63e6634078e 100644 |
| --- a/drivers/gpu/drm/tegra/sor.c |
| +++ b/drivers/gpu/drm/tegra/sor.c |
| @@ -3197,6 +3197,11 @@ static int tegra_sor_parse_dt(struct tegra_sor *sor) |
| * earlier |
| */ |
| sor->pad = TEGRA_IO_PAD_HDMI_DP0 + sor->index; |
| + } else { |
| + if (sor->soc->supports_edp) |
| + sor->index = 0; |
| + else |
| + sor->index = 1; |
| } |
| |
| err = of_property_read_u32_array(np, "nvidia,xbar-cfg", xbar_cfg, 5); |
| -- |
| 2.7.4 |
| |