diff mbox series

[01/12] memory: tegra: Add gr2d and gr3d to DRM IOMMU group

Message ID 20191028123718.3890217-2-thierry.reding@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm/tegra: Support IOMMU-backed DMA API | expand

Commit Message

Thierry Reding Oct. 28, 2019, 12:37 p.m. UTC
From: Thierry Reding <treding@nvidia.com>

All of the devices making up the Tegra DRM device want to share a single
IOMMU domain. Put them into a single group to allow them to do that.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/memory/tegra/tegra114.c | 10 ++++++----
 drivers/memory/tegra/tegra124.c |  8 +++++---
 drivers/memory/tegra/tegra30.c  | 11 +++++++----
 3 files changed, 18 insertions(+), 11 deletions(-)

Comments

Dmitry Osipenko Oct. 30, 2019, 3:05 p.m. UTC | #1
28.10.2019 15:37, Thierry Reding пишет:
> From: Thierry Reding <treding@nvidia.com>
> 
> All of the devices making up the Tegra DRM device want to share a single
> IOMMU domain. Put them into a single group to allow them to do that.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/memory/tegra/tegra114.c | 10 ++++++----
>  drivers/memory/tegra/tegra124.c |  8 +++++---
>  drivers/memory/tegra/tegra30.c  | 11 +++++++----
>  3 files changed, 18 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/memory/tegra/tegra114.c b/drivers/memory/tegra/tegra114.c
> index ac8351b5beeb..48ef01c3ff90 100644
> --- a/drivers/memory/tegra/tegra114.c
> +++ b/drivers/memory/tegra/tegra114.c
> @@ -909,16 +909,18 @@ static const struct tegra_smmu_swgroup tegra114_swgroups[] = {
>  	{ .name = "tsec",      .swgroup = TEGRA_SWGROUP_TSEC,      .reg = 0x294 },
>  };
>  
> -static const unsigned int tegra114_group_display[] = {
> +static const unsigned int tegra114_group_drm[] = {
>  	TEGRA_SWGROUP_DC,
>  	TEGRA_SWGROUP_DCB,
> +	TEGRA_SWGROUP_G2,
> +	TEGRA_SWGROUP_NV,
>  };
>  
>  static const struct tegra_smmu_group_soc tegra114_groups[] = {
>  	{
> -		.name = "display",
> -		.swgroups = tegra114_group_display,
> -		.num_swgroups = ARRAY_SIZE(tegra114_group_display),
> +		.name = "drm",
> +		.swgroups = tegra114_group_drm,
> +		.num_swgroups = ARRAY_SIZE(tegra114_group_drm),
>  	},
>  };
>  
> diff --git a/drivers/memory/tegra/tegra124.c b/drivers/memory/tegra/tegra124.c
> index 5d0ccb2be206..62b30b1b9677 100644
> --- a/drivers/memory/tegra/tegra124.c
> +++ b/drivers/memory/tegra/tegra124.c
> @@ -974,16 +974,18 @@ static const struct tegra_smmu_swgroup tegra124_swgroups[] = {
>  	{ .name = "vi",        .swgroup = TEGRA_SWGROUP_VI,        .reg = 0x280 },
>  };
>  
> -static const unsigned int tegra124_group_display[] = {
> +static const unsigned int tegra124_group_drm[] = {
>  	TEGRA_SWGROUP_DC,
>  	TEGRA_SWGROUP_DCB,
> +	TEGRA_SWGROUP_GPU,
> +	TEGRA_SWGROUP_VIC,
>  };
>  
>  static const struct tegra_smmu_group_soc tegra124_groups[] = {
>  	{
>  		.name = "display",
> -		.swgroups = tegra124_group_display,
> -		.num_swgroups = ARRAY_SIZE(tegra124_group_display),
> +		.swgroups = tegra124_group_drm,
> +		.num_swgroups = ARRAY_SIZE(tegra124_group_drm),
>  	},

The "display" -> "drm" group's renaming is missed for T124.

[snip]
Thierry Reding Nov. 1, 2019, 9:56 a.m. UTC | #2
On Wed, Oct 30, 2019 at 06:05:48PM +0300, Dmitry Osipenko wrote:
> 28.10.2019 15:37, Thierry Reding пишет:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > All of the devices making up the Tegra DRM device want to share a single
> > IOMMU domain. Put them into a single group to allow them to do that.
> > 
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> >  drivers/memory/tegra/tegra114.c | 10 ++++++----
> >  drivers/memory/tegra/tegra124.c |  8 +++++---
> >  drivers/memory/tegra/tegra30.c  | 11 +++++++----
> >  3 files changed, 18 insertions(+), 11 deletions(-)
> > 
> > diff --git a/drivers/memory/tegra/tegra114.c b/drivers/memory/tegra/tegra114.c
> > index ac8351b5beeb..48ef01c3ff90 100644
> > --- a/drivers/memory/tegra/tegra114.c
> > +++ b/drivers/memory/tegra/tegra114.c
> > @@ -909,16 +909,18 @@ static const struct tegra_smmu_swgroup tegra114_swgroups[] = {
> >  	{ .name = "tsec",      .swgroup = TEGRA_SWGROUP_TSEC,      .reg = 0x294 },
> >  };
> >  
> > -static const unsigned int tegra114_group_display[] = {
> > +static const unsigned int tegra114_group_drm[] = {
> >  	TEGRA_SWGROUP_DC,
> >  	TEGRA_SWGROUP_DCB,
> > +	TEGRA_SWGROUP_G2,
> > +	TEGRA_SWGROUP_NV,
> >  };
> >  
> >  static const struct tegra_smmu_group_soc tegra114_groups[] = {
> >  	{
> > -		.name = "display",
> > -		.swgroups = tegra114_group_display,
> > -		.num_swgroups = ARRAY_SIZE(tegra114_group_display),
> > +		.name = "drm",
> > +		.swgroups = tegra114_group_drm,
> > +		.num_swgroups = ARRAY_SIZE(tegra114_group_drm),
> >  	},
> >  };
> >  
> > diff --git a/drivers/memory/tegra/tegra124.c b/drivers/memory/tegra/tegra124.c
> > index 5d0ccb2be206..62b30b1b9677 100644
> > --- a/drivers/memory/tegra/tegra124.c
> > +++ b/drivers/memory/tegra/tegra124.c
> > @@ -974,16 +974,18 @@ static const struct tegra_smmu_swgroup tegra124_swgroups[] = {
> >  	{ .name = "vi",        .swgroup = TEGRA_SWGROUP_VI,        .reg = 0x280 },
> >  };
> >  
> > -static const unsigned int tegra124_group_display[] = {
> > +static const unsigned int tegra124_group_drm[] = {
> >  	TEGRA_SWGROUP_DC,
> >  	TEGRA_SWGROUP_DCB,
> > +	TEGRA_SWGROUP_GPU,
> > +	TEGRA_SWGROUP_VIC,
> >  };
> >  
> >  static const struct tegra_smmu_group_soc tegra124_groups[] = {
> >  	{
> >  		.name = "display",
> > -		.swgroups = tegra124_group_display,
> > -		.num_swgroups = ARRAY_SIZE(tegra124_group_display),
> > +		.swgroups = tegra124_group_drm,
> > +		.num_swgroups = ARRAY_SIZE(tegra124_group_drm),
> >  	},
> 
> The "display" -> "drm" group's renaming is missed for T124.

Good catch! Fixed now.

Thanks,
Thierry
diff mbox series

Patch

diff --git a/drivers/memory/tegra/tegra114.c b/drivers/memory/tegra/tegra114.c
index ac8351b5beeb..48ef01c3ff90 100644
--- a/drivers/memory/tegra/tegra114.c
+++ b/drivers/memory/tegra/tegra114.c
@@ -909,16 +909,18 @@  static const struct tegra_smmu_swgroup tegra114_swgroups[] = {
 	{ .name = "tsec",      .swgroup = TEGRA_SWGROUP_TSEC,      .reg = 0x294 },
 };
 
-static const unsigned int tegra114_group_display[] = {
+static const unsigned int tegra114_group_drm[] = {
 	TEGRA_SWGROUP_DC,
 	TEGRA_SWGROUP_DCB,
+	TEGRA_SWGROUP_G2,
+	TEGRA_SWGROUP_NV,
 };
 
 static const struct tegra_smmu_group_soc tegra114_groups[] = {
 	{
-		.name = "display",
-		.swgroups = tegra114_group_display,
-		.num_swgroups = ARRAY_SIZE(tegra114_group_display),
+		.name = "drm",
+		.swgroups = tegra114_group_drm,
+		.num_swgroups = ARRAY_SIZE(tegra114_group_drm),
 	},
 };
 
diff --git a/drivers/memory/tegra/tegra124.c b/drivers/memory/tegra/tegra124.c
index 5d0ccb2be206..62b30b1b9677 100644
--- a/drivers/memory/tegra/tegra124.c
+++ b/drivers/memory/tegra/tegra124.c
@@ -974,16 +974,18 @@  static const struct tegra_smmu_swgroup tegra124_swgroups[] = {
 	{ .name = "vi",        .swgroup = TEGRA_SWGROUP_VI,        .reg = 0x280 },
 };
 
-static const unsigned int tegra124_group_display[] = {
+static const unsigned int tegra124_group_drm[] = {
 	TEGRA_SWGROUP_DC,
 	TEGRA_SWGROUP_DCB,
+	TEGRA_SWGROUP_GPU,
+	TEGRA_SWGROUP_VIC,
 };
 
 static const struct tegra_smmu_group_soc tegra124_groups[] = {
 	{
 		.name = "display",
-		.swgroups = tegra124_group_display,
-		.num_swgroups = ARRAY_SIZE(tegra124_group_display),
+		.swgroups = tegra124_group_drm,
+		.num_swgroups = ARRAY_SIZE(tegra124_group_drm),
 	},
 };
 
diff --git a/drivers/memory/tegra/tegra30.c b/drivers/memory/tegra/tegra30.c
index 14788fc2f9e8..8947bee6d032 100644
--- a/drivers/memory/tegra/tegra30.c
+++ b/drivers/memory/tegra/tegra30.c
@@ -931,16 +931,19 @@  static const struct tegra_smmu_swgroup tegra30_swgroups[] = {
 	{ .name = "isp",  .swgroup = TEGRA_SWGROUP_ISP,  .reg = 0x258 },
 };
 
-static const unsigned int tegra30_group_display[] = {
+static const unsigned int tegra30_group_drm[] = {
 	TEGRA_SWGROUP_DC,
 	TEGRA_SWGROUP_DCB,
+	TEGRA_SWGROUP_G2,
+	TEGRA_SWGROUP_NV,
+	TEGRA_SWGROUP_NV2,
 };
 
 static const struct tegra_smmu_group_soc tegra30_groups[] = {
 	{
-		.name = "display",
-		.swgroups = tegra30_group_display,
-		.num_swgroups = ARRAY_SIZE(tegra30_group_display),
+		.name = "drm",
+		.swgroups = tegra30_group_drm,
+		.num_swgroups = ARRAY_SIZE(tegra30_group_drm),
 	},
 };