All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/etnaviv: improve error reporting in GPU init path
@ 2016-06-17 10:42 Lucas Stach
  2016-06-17 10:42 ` [PATCH 2/2] drm/etnaviv: remove generic GPU init failure reporting Lucas Stach
  2016-06-20 10:47 ` [PATCH 1/2] drm/etnaviv: improve error reporting in GPU init path Christian Gmeiner
  0 siblings, 2 replies; 4+ messages in thread
From: Lucas Stach @ 2016-06-17 10:42 UTC (permalink / raw)
  To: Russell King, Christian Gmeiner; +Cc: kernel, dri-devel, patchwork-lst

Print error messages that mention the exact cause of the failure on
all paths which may fail the GPU init.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 9b72b6a9c29c..87ef34150d46 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -597,8 +597,10 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 	bool mmuv2;
 
 	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;
+	}
 
 	etnaviv_hw_identify(gpu);
 
@@ -635,8 +637,10 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 	}
 
 	ret = etnaviv_hw_reset(gpu);
-	if (ret)
+	if (ret) {
+		dev_err(gpu->dev, "GPU reset failed\n");
 		goto fail;
+	}
 
 	/* Setup IOMMU.. eventually we will (I think) do this once per context
 	 * and have separate page tables per context.  For now, to keep things
@@ -654,12 +658,14 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 	}
 
 	if (!iommu) {
+		dev_err(gpu->dev, "Failed to allocate GPU IOMMU domain\n");
 		ret = -ENOMEM;
 		goto fail;
 	}
 
 	gpu->mmu = etnaviv_iommu_new(gpu, iommu, version);
 	if (!gpu->mmu) {
+		dev_err(gpu->dev, "Failed to instantiate GPU IOMMU\n");
 		iommu_domain_free(iommu);
 		ret = -ENOMEM;
 		goto fail;
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] drm/etnaviv: remove generic GPU init failure reporting
  2016-06-17 10:42 [PATCH 1/2] drm/etnaviv: improve error reporting in GPU init path Lucas Stach
@ 2016-06-17 10:42 ` Lucas Stach
  2016-06-20 10:48   ` Christian Gmeiner
  2016-06-20 10:47 ` [PATCH 1/2] drm/etnaviv: improve error reporting in GPU init path Christian Gmeiner
  1 sibling, 1 reply; 4+ messages in thread
From: Lucas Stach @ 2016-06-17 10:42 UTC (permalink / raw)
  To: Russell King, Christian Gmeiner; +Cc: kernel, dri-devel, patchwork-lst

The GPU init path now reports any errors which might occur more accurately
than what is possible with the generic "something failed" message.

Remove the generic reporting, so we don't log an error into dmesg anymore
if any of the GPU cores are ignored.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
index 3d4f56df8359..7c5a4b408961 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
@@ -91,10 +91,8 @@ static void load_gpu(struct drm_device *dev)
 			int ret;
 
 			ret = etnaviv_gpu_init(g);
-			if (ret) {
-				dev_err(g->dev, "hw init failed: %d\n", ret);
+			if (ret)
 				priv->gpu[i] = NULL;
-			}
 		}
 	}
 }
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] drm/etnaviv: improve error reporting in GPU init path
  2016-06-17 10:42 [PATCH 1/2] drm/etnaviv: improve error reporting in GPU init path Lucas Stach
  2016-06-17 10:42 ` [PATCH 2/2] drm/etnaviv: remove generic GPU init failure reporting Lucas Stach
@ 2016-06-20 10:47 ` Christian Gmeiner
  1 sibling, 0 replies; 4+ messages in thread
From: Christian Gmeiner @ 2016-06-20 10:47 UTC (permalink / raw)
  To: Lucas Stach; +Cc: patchwork-lst, Sascha Hauer, DRI mailing list, Russell King

2016-06-17 12:42 GMT+02:00 Lucas Stach <l.stach@pengutronix.de>:
> Print error messages that mention the exact cause of the failure on
> all paths which may fail the GPU init.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>

> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> index 9b72b6a9c29c..87ef34150d46 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> @@ -597,8 +597,10 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
>         bool mmuv2;
>
>         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;
> +       }
>
>         etnaviv_hw_identify(gpu);
>
> @@ -635,8 +637,10 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
>         }
>
>         ret = etnaviv_hw_reset(gpu);
> -       if (ret)
> +       if (ret) {
> +               dev_err(gpu->dev, "GPU reset failed\n");
>                 goto fail;
> +       }
>
>         /* Setup IOMMU.. eventually we will (I think) do this once per context
>          * and have separate page tables per context.  For now, to keep things
> @@ -654,12 +658,14 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
>         }
>
>         if (!iommu) {
> +               dev_err(gpu->dev, "Failed to allocate GPU IOMMU domain\n");
>                 ret = -ENOMEM;
>                 goto fail;
>         }
>
>         gpu->mmu = etnaviv_iommu_new(gpu, iommu, version);
>         if (!gpu->mmu) {
> +               dev_err(gpu->dev, "Failed to instantiate GPU IOMMU\n");
>                 iommu_domain_free(iommu);
>                 ret = -ENOMEM;
>                 goto fail;
> --
> 2.8.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] drm/etnaviv: remove generic GPU init failure reporting
  2016-06-17 10:42 ` [PATCH 2/2] drm/etnaviv: remove generic GPU init failure reporting Lucas Stach
@ 2016-06-20 10:48   ` Christian Gmeiner
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Gmeiner @ 2016-06-20 10:48 UTC (permalink / raw)
  To: Lucas Stach; +Cc: patchwork-lst, Sascha Hauer, DRI mailing list, Russell King

2016-06-17 12:42 GMT+02:00 Lucas Stach <l.stach@pengutronix.de>:
> The GPU init path now reports any errors which might occur more accurately
> than what is possible with the generic "something failed" message.
>
> Remove the generic reporting, so we don't log an error into dmesg anymore
> if any of the GPU cores are ignored.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>

> ---
>  drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> index 3d4f56df8359..7c5a4b408961 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> @@ -91,10 +91,8 @@ static void load_gpu(struct drm_device *dev)
>                         int ret;
>
>                         ret = etnaviv_gpu_init(g);
> -                       if (ret) {
> -                               dev_err(g->dev, "hw init failed: %d\n", ret);
> +                       if (ret)
>                                 priv->gpu[i] = NULL;
> -                       }
>                 }
>         }
>  }
> --
> 2.8.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-06-20 10:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-17 10:42 [PATCH 1/2] drm/etnaviv: improve error reporting in GPU init path Lucas Stach
2016-06-17 10:42 ` [PATCH 2/2] drm/etnaviv: remove generic GPU init failure reporting Lucas Stach
2016-06-20 10:48   ` Christian Gmeiner
2016-06-20 10:47 ` [PATCH 1/2] drm/etnaviv: improve error reporting in GPU init path Christian Gmeiner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.