From: Boris Brezillon <boris.brezillon@collabora.com>
To: "Boris Brezillon" <boris.brezillon@collabora.com>,
"Steven Price" <steven.price@arm.com>,
"Liviu Dudau" <liviu.dudau@arm.com>,
"Adrián Larumbe" <adrian.larumbe@collabora.com>
Cc: dri-devel@lists.freedesktop.org, kernel@collabora.com
Subject: [PATCH v3 1/5] drm/panthor: Preserve the result returned by panthor_fw_resume()
Date: Wed, 11 Dec 2024 08:54:15 +0100 [thread overview]
Message-ID: <20241211075419.2333731-2-boris.brezillon@collabora.com> (raw)
In-Reply-To: <20241211075419.2333731-1-boris.brezillon@collabora.com>
WARN() will return true if the condition is true, false otherwise.
If we store the return of drm_WARN_ON() in ret, we lose the actual
error code.
v3:
- Add R-b
v2:
- Add R-b
Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Adrian Larumbe <adrian.larumbe@collabora.com>
---
drivers/gpu/drm/panthor/panthor_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
index 984615f4ed27..e701e605d013 100644
--- a/drivers/gpu/drm/panthor/panthor_device.c
+++ b/drivers/gpu/drm/panthor/panthor_device.c
@@ -461,8 +461,8 @@ int panthor_device_resume(struct device *dev)
drm_dev_enter(&ptdev->base, &cookie)) {
panthor_gpu_resume(ptdev);
panthor_mmu_resume(ptdev);
- ret = drm_WARN_ON(&ptdev->base, panthor_fw_resume(ptdev));
- if (!ret) {
+ ret = panthor_fw_resume(ptdev);
+ if (!drm_WARN_ON(&ptdev->base, ret)) {
panthor_sched_resume(ptdev);
} else {
panthor_mmu_suspend(ptdev);
--
2.47.0
next prev parent reply other threads:[~2024-12-11 7:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 7:54 [PATCH v3 0/5] drm/panthor: Be robust against failures in the resume path Boris Brezillon
2024-12-11 7:54 ` Boris Brezillon [this message]
2024-12-11 9:50 ` [PATCH v3 1/5] drm/panthor: Preserve the result returned by panthor_fw_resume() Liviu Dudau
2024-12-11 7:54 ` [PATCH v3 2/5] drm/panthor: Be robust against runtime PM resume failures in the suspend path Boris Brezillon
2024-12-11 7:54 ` [PATCH v3 3/5] drm/panthor: Ignore devfreq_{suspend, resume}_device() failures Boris Brezillon
2024-12-11 7:54 ` [PATCH v3 4/5] drm/panthor: Be robust against resume failures Boris Brezillon
2024-12-11 7:54 ` [PATCH v3 5/5] drm/panthor: Fix the fast-reset logic Boris Brezillon
2024-12-11 9:57 ` Liviu Dudau
2024-12-11 10:09 ` Boris Brezillon
2024-12-11 10:10 ` [PATCH v3 0/5] drm/panthor: Be robust against failures in the resume path Boris Brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241211075419.2333731-2-boris.brezillon@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=adrian.larumbe@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=liviu.dudau@arm.com \
--cc=steven.price@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.