aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/host1x/dev.c')
-rw-r--r--drivers/gpu/host1x/dev.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 2c58a390123a..778272514164 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -186,8 +186,13 @@ static int host1x_probe(struct platform_device *pdev)
186 return -ENOMEM; 186 return -ENOMEM;
187 187
188 err = iommu_attach_device(host->domain, &pdev->dev); 188 err = iommu_attach_device(host->domain, &pdev->dev);
189 if (err) 189 if (err == -ENODEV) {
190 iommu_domain_free(host->domain);
191 host->domain = NULL;
192 goto skip_iommu;
193 } else if (err) {
190 goto fail_free_domain; 194 goto fail_free_domain;
195 }
191 196
192 geometry = &host->domain->geometry; 197 geometry = &host->domain->geometry;
193 198
@@ -198,6 +203,7 @@ static int host1x_probe(struct platform_device *pdev)
198 host->iova_end = geometry->aperture_end; 203 host->iova_end = geometry->aperture_end;
199 } 204 }
200 205
206skip_iommu:
201 err = host1x_channel_list_init(&host->channel_list, 207 err = host1x_channel_list_init(&host->channel_list,
202 host->info->nb_channels); 208 host->info->nb_channels);
203 if (err) { 209 if (err) {