diff options
author | Thierry Reding <treding@nvidia.com> | 2019-02-08 14:35:13 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2019-10-28 11:18:37 +0100 |
commit | aacdf19849734d1be5e407932228ae101ba5b92f (patch) | |
tree | 743e7f58ea9476bd65390628f4d25d7bfdc6541f /drivers/gpu/drm/tegra/dc.c | |
parent | 7baa943e0bb22454887edd1fffb2d00a4b842fe5 (diff) | |
download | lwn-aacdf19849734d1be5e407932228ae101ba5b92f.tar.gz lwn-aacdf19849734d1be5e407932228ae101ba5b92f.zip |
drm/tegra: Move IOMMU group into host1x client
Handling of the IOMMU group attachment is common to all clients, so move
the group into the client to simplify code.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/dc.c')
-rw-r--r-- | drivers/gpu/drm/tegra/dc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index f7f7984bb749..3ac535bd99ca 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -2014,9 +2014,8 @@ static int tegra_dc_init(struct host1x_client *client) if (!dc->syncpt) dev_warn(dc->dev, "failed to allocate syncpoint\n"); - dc->group = host1x_client_iommu_attach(client, true); - if (IS_ERR(dc->group)) { - err = PTR_ERR(dc->group); + err = host1x_client_iommu_attach(client, true); + if (err < 0) { dev_err(client->dev, "failed to attach to domain: %d\n", err); return err; } @@ -2089,7 +2088,7 @@ cleanup: if (!IS_ERR(primary)) drm_plane_cleanup(primary); - host1x_client_iommu_detach(client, dc->group); + host1x_client_iommu_detach(client); host1x_syncpt_free(dc->syncpt); return err; @@ -2114,7 +2113,7 @@ static int tegra_dc_exit(struct host1x_client *client) return err; } - host1x_client_iommu_detach(client, dc->group); + host1x_client_iommu_detach(client); host1x_syncpt_free(dc->syncpt); return 0; |