* [PATCH] drm/panthor: Fix the panthor_gpu_coherency_init() error path
@ 2025-04-14 13:01 Boris Brezillon
2025-04-15 11:22 ` Liviu Dudau
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Boris Brezillon @ 2025-04-14 13:01 UTC (permalink / raw)
To: Boris Brezillon, Steven Price, Liviu Dudau, Adrián Larumbe
Cc: dri-devel, kernel, Dan Carpenter
The panthor_gpu_coherency_init() call has been moved around, but the
error path hasn't been adjusted accordingly. Make sure we undo what
has been done before this call in case of failure.
Fixes: 7d5a3b22f5b5 ("drm/panthor: Call panthor_gpu_coherency_init() after PM resume()")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/dri-devel/4da470aa-4f84-460e-aff8-dabc8cc4da15@stanley.mountain/T/#t
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
drivers/gpu/drm/panthor/panthor_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
index c73c1608d6e6..1e8811c6716d 100644
--- a/drivers/gpu/drm/panthor/panthor_device.c
+++ b/drivers/gpu/drm/panthor/panthor_device.c
@@ -245,7 +245,7 @@ int panthor_device_init(struct panthor_device *ptdev)
ret = panthor_gpu_coherency_init(ptdev);
if (ret)
- return ret;
+ goto err_unplug_gpu;
ret = panthor_mmu_init(ptdev);
if (ret)
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panthor: Fix the panthor_gpu_coherency_init() error path
2025-04-14 13:01 [PATCH] drm/panthor: Fix the panthor_gpu_coherency_init() error path Boris Brezillon
@ 2025-04-15 11:22 ` Liviu Dudau
2025-04-16 14:19 ` Steven Price
2025-04-17 9:31 ` Boris Brezillon
2 siblings, 0 replies; 4+ messages in thread
From: Liviu Dudau @ 2025-04-15 11:22 UTC (permalink / raw)
To: Boris Brezillon
Cc: Steven Price, Adrián Larumbe, dri-devel, kernel,
Dan Carpenter
On Mon, Apr 14, 2025 at 03:01:20PM +0200, Boris Brezillon wrote:
> The panthor_gpu_coherency_init() call has been moved around, but the
> error path hasn't been adjusted accordingly. Make sure we undo what
> has been done before this call in case of failure.
>
> Fixes: 7d5a3b22f5b5 ("drm/panthor: Call panthor_gpu_coherency_init() after PM resume()")
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/dri-devel/4da470aa-4f84-460e-aff8-dabc8cc4da15@stanley.mountain/T/#t
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Good catch!
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Best regards,
Liviu
> ---
> drivers/gpu/drm/panthor/panthor_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> index c73c1608d6e6..1e8811c6716d 100644
> --- a/drivers/gpu/drm/panthor/panthor_device.c
> +++ b/drivers/gpu/drm/panthor/panthor_device.c
> @@ -245,7 +245,7 @@ int panthor_device_init(struct panthor_device *ptdev)
>
> ret = panthor_gpu_coherency_init(ptdev);
> if (ret)
> - return ret;
> + goto err_unplug_gpu;
>
> ret = panthor_mmu_init(ptdev);
> if (ret)
> --
> 2.49.0
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panthor: Fix the panthor_gpu_coherency_init() error path
2025-04-14 13:01 [PATCH] drm/panthor: Fix the panthor_gpu_coherency_init() error path Boris Brezillon
2025-04-15 11:22 ` Liviu Dudau
@ 2025-04-16 14:19 ` Steven Price
2025-04-17 9:31 ` Boris Brezillon
2 siblings, 0 replies; 4+ messages in thread
From: Steven Price @ 2025-04-16 14:19 UTC (permalink / raw)
To: Boris Brezillon, Liviu Dudau, Adrián Larumbe
Cc: dri-devel, kernel, Dan Carpenter
On 14/04/2025 14:01, Boris Brezillon wrote:
> The panthor_gpu_coherency_init() call has been moved around, but the
> error path hasn't been adjusted accordingly. Make sure we undo what
> has been done before this call in case of failure.
>
> Fixes: 7d5a3b22f5b5 ("drm/panthor: Call panthor_gpu_coherency_init() after PM resume()")
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/dri-devel/4da470aa-4f84-460e-aff8-dabc8cc4da15@stanley.mountain/T/#t
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
> ---
> drivers/gpu/drm/panthor/panthor_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> index c73c1608d6e6..1e8811c6716d 100644
> --- a/drivers/gpu/drm/panthor/panthor_device.c
> +++ b/drivers/gpu/drm/panthor/panthor_device.c
> @@ -245,7 +245,7 @@ int panthor_device_init(struct panthor_device *ptdev)
>
> ret = panthor_gpu_coherency_init(ptdev);
> if (ret)
> - return ret;
> + goto err_unplug_gpu;
>
> ret = panthor_mmu_init(ptdev);
> if (ret)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panthor: Fix the panthor_gpu_coherency_init() error path
2025-04-14 13:01 [PATCH] drm/panthor: Fix the panthor_gpu_coherency_init() error path Boris Brezillon
2025-04-15 11:22 ` Liviu Dudau
2025-04-16 14:19 ` Steven Price
@ 2025-04-17 9:31 ` Boris Brezillon
2 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2025-04-17 9:31 UTC (permalink / raw)
To: Boris Brezillon, Steven Price, Liviu Dudau, Adrián Larumbe
Cc: dri-devel, kernel, Dan Carpenter
On Mon, 14 Apr 2025 15:01:20 +0200
Boris Brezillon <boris.brezillon@collabora.com> wrote:
> The panthor_gpu_coherency_init() call has been moved around, but the
> error path hasn't been adjusted accordingly. Make sure we undo what
> has been done before this call in case of failure.
>
> Fixes: 7d5a3b22f5b5 ("drm/panthor: Call panthor_gpu_coherency_init() after PM resume()")
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/dri-devel/4da470aa-4f84-460e-aff8-dabc8cc4da15@stanley.mountain/T/#t
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Queued to drm-misc-next.
> ---
> drivers/gpu/drm/panthor/panthor_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> index c73c1608d6e6..1e8811c6716d 100644
> --- a/drivers/gpu/drm/panthor/panthor_device.c
> +++ b/drivers/gpu/drm/panthor/panthor_device.c
> @@ -245,7 +245,7 @@ int panthor_device_init(struct panthor_device *ptdev)
>
> ret = panthor_gpu_coherency_init(ptdev);
> if (ret)
> - return ret;
> + goto err_unplug_gpu;
>
> ret = panthor_mmu_init(ptdev);
> if (ret)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-17 9:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14 13:01 [PATCH] drm/panthor: Fix the panthor_gpu_coherency_init() error path Boris Brezillon
2025-04-15 11:22 ` Liviu Dudau
2025-04-16 14:19 ` Steven Price
2025-04-17 9:31 ` Boris Brezillon
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.