drm/tegra: dc: Use correct format array for Tegra124
authorStefan Agner <stefan@agner.ch>
Tue, 20 Mar 2018 09:11:44 +0000 (10:11 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 22 Mar 2018 14:28:09 +0000 (15:28 +0100)
Use tegra124_(primary|overlay)_formats for Tegra124, otherwise the count
specified in the Tegra124 SoC info structure will be different from the
array size and cause a crash.

Fixes: 511c7023cf23 ("drm/tegra: dc: Support more formats")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dc.c

index fbffe1948b3bb2d5311ecbee000ee879fbd6ce28..c1a5ae8faaef25a1c4d2555163896eb2285d1272 100644 (file)
@@ -2009,9 +2009,9 @@ static const struct tegra_dc_soc_info tegra124_dc_soc_info = {
        .coupled_pm = false,
        .has_nvdisplay = false,
        .num_primary_formats = ARRAY_SIZE(tegra124_primary_formats),
-       .primary_formats = tegra114_primary_formats,
+       .primary_formats = tegra124_primary_formats,
        .num_overlay_formats = ARRAY_SIZE(tegra124_overlay_formats),
-       .overlay_formats = tegra114_overlay_formats,
+       .overlay_formats = tegra124_overlay_formats,
 };
 
 static const struct tegra_dc_soc_info tegra210_dc_soc_info = {