提交 1409df04 编写于 作者: L Lucas Stach

drm/etnaviv: improve error reporting in GPU init path

Print error messages that mention the exact cause of the failure on
all paths which may fail the GPU init.
Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
Reviewed-by: NChristian Gmeiner <christian.gmeiner@gmail.com>
上级 7d0c6e71
...@@ -597,8 +597,10 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu) ...@@ -597,8 +597,10 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
bool mmuv2; bool mmuv2;
ret = pm_runtime_get_sync(gpu->dev); ret = pm_runtime_get_sync(gpu->dev);
if (ret < 0) if (ret < 0) {
dev_err(gpu->dev, "Failed to enable GPU power domain\n");
return ret; return ret;
}
etnaviv_hw_identify(gpu); etnaviv_hw_identify(gpu);
...@@ -635,8 +637,10 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu) ...@@ -635,8 +637,10 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
} }
ret = etnaviv_hw_reset(gpu); ret = etnaviv_hw_reset(gpu);
if (ret) if (ret) {
dev_err(gpu->dev, "GPU reset failed\n");
goto fail; goto fail;
}
/* Setup IOMMU.. eventually we will (I think) do this once per context /* Setup IOMMU.. eventually we will (I think) do this once per context
* and have separate page tables per context. For now, to keep things * and have separate page tables per context. For now, to keep things
...@@ -654,12 +658,14 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu) ...@@ -654,12 +658,14 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
} }
if (!iommu) { if (!iommu) {
dev_err(gpu->dev, "Failed to allocate GPU IOMMU domain\n");
ret = -ENOMEM; ret = -ENOMEM;
goto fail; goto fail;
} }
gpu->mmu = etnaviv_iommu_new(gpu, iommu, version); gpu->mmu = etnaviv_iommu_new(gpu, iommu, version);
if (!gpu->mmu) { if (!gpu->mmu) {
dev_err(gpu->dev, "Failed to instantiate GPU IOMMU\n");
iommu_domain_free(iommu); iommu_domain_free(iommu);
ret = -ENOMEM; ret = -ENOMEM;
goto fail; goto fail;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册