drm/tegra: Silence expected errors on IOMMU attach
Subdevices may not be hooked up to an IOMMU via device tree. Detect such situations and avoid confusing users by not emitting an error message. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
82d73874d4
commit
a8817489dc
@ -2017,7 +2017,7 @@ static int tegra_dc_init(struct host1x_client *client)
|
|||||||
dev_warn(dc->dev, "failed to allocate syncpoint\n");
|
dev_warn(dc->dev, "failed to allocate syncpoint\n");
|
||||||
|
|
||||||
err = host1x_client_iommu_attach(client);
|
err = host1x_client_iommu_attach(client);
|
||||||
if (err < 0) {
|
if (err < 0 && err != -ENODEV) {
|
||||||
dev_err(client->dev, "failed to attach to domain: %d\n", err);
|
dev_err(client->dev, "failed to attach to domain: %d\n", err);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -920,10 +920,8 @@ int host1x_client_iommu_attach(struct host1x_client *client)
|
|||||||
|
|
||||||
if (tegra->domain) {
|
if (tegra->domain) {
|
||||||
group = iommu_group_get(client->dev);
|
group = iommu_group_get(client->dev);
|
||||||
if (!group) {
|
if (!group)
|
||||||
dev_err(client->dev, "failed to get IOMMU group\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
|
||||||
|
|
||||||
if (domain != tegra->domain) {
|
if (domain != tegra->domain) {
|
||||||
err = iommu_attach_group(tegra->domain, group);
|
err = iommu_attach_group(tegra->domain, group);
|
||||||
|
@ -167,7 +167,7 @@ static int vic_init(struct host1x_client *client)
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = host1x_client_iommu_attach(client);
|
err = host1x_client_iommu_attach(client);
|
||||||
if (err < 0) {
|
if (err < 0 && err != -ENODEV) {
|
||||||
dev_err(vic->dev, "failed to attach to domain: %d\n", err);
|
dev_err(vic->dev, "failed to attach to domain: %d\n", err);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user