diff mbox

[v2,16/27] drm/tegra: Add Tegra114 display controller support

Message ID 1381134884-5816-17-git-send-email-treding@nvidia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thierry Reding Oct. 7, 2013, 8:34 a.m. UTC
From: Mikko Perttunen <mperttunen@nvidia.com>

The Tegra114 display controller is backwards-compatible with previous
generations of the Tegra SoC. No code changes are required.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/tegra/dc.c  | 1 +
 drivers/gpu/drm/tegra/drm.c | 1 +
 2 files changed, 2 insertions(+)

Comments

Stephen Warren Oct. 11, 2013, 10:14 p.m. UTC | #1
On 10/07/2013 02:34 AM, Thierry Reding wrote:
> From: Mikko Perttunen <mperttunen@nvidia.com>
> 
> The Tegra114 display controller is backwards-compatible with previous
> generations of the Tegra SoC. No code changes are required.

If the HW is backwards-compatible, then there's no need to add extra
compatible values to the driver; just write the following in the DT, and
it'll just work:

compatible = "nvidia,tegra114-dc", "nvidia,tegra30-dc";
Thierry Reding Oct. 12, 2013, 11:32 a.m. UTC | #2
On Fri, Oct 11, 2013 at 04:14:27PM -0600, Stephen Warren wrote:
> On 10/07/2013 02:34 AM, Thierry Reding wrote:
> > From: Mikko Perttunen <mperttunen@nvidia.com>
> > 
> > The Tegra114 display controller is backwards-compatible with previous
> > generations of the Tegra SoC. No code changes are required.
> 
> If the HW is backwards-compatible, then there's no need to add extra
> compatible values to the driver; just write the following in the DT, and
> it'll just work:
> 
> compatible = "nvidia,tegra114-dc", "nvidia,tegra30-dc";

One reason why I thought it might be useful to still include this, even
though unnecessary, was to match it to the host1x_drm_subdevs table. We
can probably remove the entry from there as well, though.

As far as I can tell, the same holds for Tegra30, which is also
backwards compatible with Tegra20 but the DTS doesn't contain the
Tegra20 compatible. So to keep ABI compatibility we'll need to keep the
nvidia,tegra30-dc in the driver's match tables, but I could still update
the DTS to include the nvidia,tegra20-dc for correctness.

Does that make sense?

Thierry
Stephen Warren Oct. 14, 2013, 6:05 p.m. UTC | #3
On 10/12/2013 05:32 AM, Thierry Reding wrote:
> On Fri, Oct 11, 2013 at 04:14:27PM -0600, Stephen Warren wrote:
>> On 10/07/2013 02:34 AM, Thierry Reding wrote:
>>> From: Mikko Perttunen <mperttunen@nvidia.com>
>>> 
>>> The Tegra114 display controller is backwards-compatible with
>>> previous generations of the Tegra SoC. No code changes are
>>> required.
>> 
>> If the HW is backwards-compatible, then there's no need to add
>> extra compatible values to the driver; just write the following
>> in the DT, and it'll just work:
>> 
>> compatible = "nvidia,tegra114-dc", "nvidia,tegra30-dc";
> 
> One reason why I thought it might be useful to still include this,
> even though unnecessary, was to match it to the host1x_drm_subdevs
> table. We can probably remove the entry from there as well,
> though.
> 
> As far as I can tell, the same holds for Tegra30, which is also 
> backwards compatible with Tegra20 but the DTS doesn't contain the 
> Tegra20 compatible. So to keep ABI compatibility we'll need to keep
> the nvidia,tegra30-dc in the driver's match tables, but I could
> still update the DTS to include the nvidia,tegra20-dc for
> correctness.
> 
> Does that make sense?

Yes, fixing the Tegra30 .dtsi file sounds like a good idea.
Thierry Reding Oct. 15, 2013, 8:06 a.m. UTC | #4
On Mon, Oct 14, 2013 at 12:05:18PM -0600, Stephen Warren wrote:
> On 10/12/2013 05:32 AM, Thierry Reding wrote:
> > On Fri, Oct 11, 2013 at 04:14:27PM -0600, Stephen Warren wrote:
> >> On 10/07/2013 02:34 AM, Thierry Reding wrote:
> >>> From: Mikko Perttunen <mperttunen@nvidia.com>
> >>> 
> >>> The Tegra114 display controller is backwards-compatible with
> >>> previous generations of the Tegra SoC. No code changes are
> >>> required.
> >> 
> >> If the HW is backwards-compatible, then there's no need to add
> >> extra compatible values to the driver; just write the following
> >> in the DT, and it'll just work:
> >> 
> >> compatible = "nvidia,tegra114-dc", "nvidia,tegra30-dc";
> > 
> > One reason why I thought it might be useful to still include this,
> > even though unnecessary, was to match it to the host1x_drm_subdevs
> > table. We can probably remove the entry from there as well,
> > though.
> > 
> > As far as I can tell, the same holds for Tegra30, which is also 
> > backwards compatible with Tegra20 but the DTS doesn't contain the 
> > Tegra20 compatible. So to keep ABI compatibility we'll need to keep
> > the nvidia,tegra30-dc in the driver's match tables, but I could
> > still update the DTS to include the nvidia,tegra20-dc for
> > correctness.
> > 
> > Does that make sense?
> 
> Yes, fixing the Tegra30 .dtsi file sounds like a good idea.

Done.

Thierry
diff mbox

Patch

diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 71cbda6..e8a0f5f 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -1183,6 +1183,7 @@  static int tegra_dc_remove(struct platform_device *pdev)
 }
 
 static struct of_device_id tegra_dc_of_match[] = {
+	{ .compatible = "nvidia,tegra114-dc", },
 	{ .compatible = "nvidia,tegra30-dc", },
 	{ .compatible = "nvidia,tegra20-dc", },
 	{ },
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index f9def3c..e958960 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -489,6 +489,7 @@  static const struct of_device_id host1x_drm_subdevs[] = {
 	{ .compatible = "nvidia,tegra30-dc", },
 	{ .compatible = "nvidia,tegra30-hdmi", },
 	{ .compatible = "nvidia,tegra30-gr2d", },
+	{ .compatible = "nvidia,tegra114-dc", },
 	{ /* sentinel */ }
 };