Skip to contentSkip to conversation

Activate Tegra114 SoC support by Tegra DRM driver

PATCH Applied Dmitry Osipenko 2 participants 7 messages Jan 12, 2021 – Jan 15, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Activate Tegra114 SoC support by Tegra DRM driver

This series enables Tegra DRM driver for Tegra114 SoC and corrects GR2D compatible entries, which is a minor correction, but it conflicts with the Tegra114 enablement if applied separately, so I included it all in a single small series.

Patches are tested by Anton Bambura on his ASUS TF701T tablet device, which is powered by Tegra114 SoC. Display panel now works on Tegra114.

Dmitry Osipenko (3):
drm/tegra: dc: Enable display controller driver for Tegra114 drm/tegra: gr2d: Correct swapped device-tree compatibles drm/tegra: gr2d: Add compatible for Tegra114

 drivers/gpu/drm/tegra/drm.c  | 2 ++
 drivers/gpu/drm/tegra/gr2d.c | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
Signature · 1 line
2.29.2
#1 lore raw

PATCH 1/3 drm/tegra: dc: Enable display controller driver for Tegra114

Display controller driver isn't listed as a DRM sub-device for Tegra114, thus display driver isn't loaded on Tegra114. Enable display controller driver for Tegra114 SoC.

---
 drivers/gpu/drm/tegra/drm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/tegra/drm.c +1 -0
index 1472042da2a7..e24e05a47197 100644
@@ -1315,6 +1315,7 @@ static const struct of_device_id host1x_drm_subdevs[] = {
 	{ .compatible = "nvidia,tegra30-hdmi", },
 	{ .compatible = "nvidia,tegra30-gr2d", },
 	{ .compatible = "nvidia,tegra30-gr3d", },
+	{ .compatible = "nvidia,tegra114-dc", },
 	{ .compatible = "nvidia,tegra114-dsi", },
 	{ .compatible = "nvidia,tegra114-hdmi", },
 	{ .compatible = "nvidia,tegra114-gr3d", },
Signature · 1 line
2.29.2
#2 lore raw

Re: [PATCH v1 1/3] drm/tegra: dc: Enable display controller driver for Tegra114

Quoted 9 lines · Dmitry Osipenko

Display controller driver isn't listed as a DRM sub-device for Tegra114, thus display driver isn't loaded on Tegra114. Enable display controller driver for Tegra114 SoC.

---
 drivers/gpu/drm/tegra/drm.c | 1 +
 1 file changed, 1 insertion(+)

Good catch! This used to be covered by an "nvidia,tegra20-dc" fallback in the DTS, but that was removed at some point.

Applied, thanks.

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

PATCH 2/3 drm/tegra: gr2d: Correct swapped device-tree compatibles

In reply to Dmitry Osipenko

The device-tree compatibles are swapped in the code, correct them.

---
 drivers/gpu/drm/tegra/gr2d.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/tegra/gr2d.c +2 -2
index 1a0d3ba6e525..f30aa86e4c9f 100644
@@ -162,8 +162,8 @@ static const struct gr2d_soc tegra30_gr2d_soc = {
 };
 
 static const struct of_device_id gr2d_match[] = {
-	{ .compatible = "nvidia,tegra30-gr2d", .data = &tegra20_gr2d_soc },
-	{ .compatible = "nvidia,tegra20-gr2d", .data = &tegra30_gr2d_soc },
+	{ .compatible = "nvidia,tegra30-gr2d", .data = &tegra30_gr2d_soc },
+	{ .compatible = "nvidia,tegra20-gr2d", .data = &tegra20_gr2d_soc },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, gr2d_match);
Signature · 1 line
2.29.2
#4 lore raw

Re: [PATCH v1 2/3] drm/tegra: gr2d: Correct swapped device-tree compatibles

Quoted 9 lines · Dmitry Osipenko

The device-tree compatibles are swapped in the code, correct them.

---
 drivers/gpu/drm/tegra/gr2d.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

PATCH 3/3 drm/tegra: gr2d: Add compatible for Tegra114

In reply to Dmitry Osipenko

Tegra114 has GR2D hardware block, support it by the 2D driver.

---
 drivers/gpu/drm/tegra/drm.c  | 1 +
 drivers/gpu/drm/tegra/gr2d.c | 5 +++++
 2 files changed, 6 insertions(+)
drivers/gpu/drm/tegra/drm.c +1 -0
index e24e05a47197..47e7945dbc3b 100644
@@ -1318,6 +1318,7 @@ static const struct of_device_id host1x_drm_subdevs[] = {
 	{ .compatible = "nvidia,tegra114-dc", },
 	{ .compatible = "nvidia,tegra114-dsi", },
 	{ .compatible = "nvidia,tegra114-hdmi", },
+	{ .compatible = "nvidia,tegra114-gr2d", },
 	{ .compatible = "nvidia,tegra114-gr3d", },
 	{ .compatible = "nvidia,tegra124-dc", },
 	{ .compatible = "nvidia,tegra124-sor", },
drivers/gpu/drm/tegra/gr2d.c +5 -0
index f30aa86e4c9f..adbe2ddcda19 100644
@@ -161,7 +161,12 @@ static const struct gr2d_soc tegra30_gr2d_soc = {
 	.version = 0x30,
 };
 
+static const struct gr2d_soc tegra114_gr2d_soc = {
+	.version = 0x35,
+};
+
 static const struct of_device_id gr2d_match[] = {
+	{ .compatible = "nvidia,tegra114-gr2d", .data = &tegra114_gr2d_soc },
 	{ .compatible = "nvidia,tegra30-gr2d", .data = &tegra30_gr2d_soc },
 	{ .compatible = "nvidia,tegra20-gr2d", .data = &tegra20_gr2d_soc },
 	{ },
Signature · 1 line
2.29.2
#6 lore raw

Re: [PATCH v1 3/3] drm/tegra: gr2d: Add compatible for Tegra114

Quoted 8 lines · Dmitry Osipenko

Tegra114 has GR2D hardware block, support it by the 2D driver.

---
 drivers/gpu/drm/tegra/drm.c  | 1 +
 drivers/gpu/drm/tegra/gr2d.c | 5 +++++
 2 files changed, 6 insertions(+)

Applied, thanks.

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel