From: Brajesh Gupta <brajesh.gupta@imgtec.com>
To: Frank Binns <frank.binns@imgtec.com>,
Matt Coster <matt.coster@imgtec.com>,
Alessio Belle <alessio.belle@imgtec.com>,
"Alexandru Dadu" <alexandru.dadu@imgtec.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
"Brajesh Gupta" <brajesh.gupta@imgtec.com>
Subject: [PATCH 3/4] drm/imagination: Rename FW booted to FW initialised
Date: Tue, 12 May 2026 12:17:05 +0530 [thread overview]
Message-ID: <20260512-b4-context_reset-v1-3-439bee96ed83@imgtec.com> (raw)
In-Reply-To: <20260512-b4-context_reset-v1-0-439bee96ed83@imgtec.com>
Update name to FW initialised from booted to better represent FW state.
Signed-off-by: Brajesh Gupta <brajesh.gupta@imgtec.com>
---
drivers/gpu/drm/imagination/pvr_device.c | 2 +-
drivers/gpu/drm/imagination/pvr_fw.c | 4 ++--
drivers/gpu/drm/imagination/pvr_fw.h | 7 +++++--
drivers/gpu/drm/imagination/pvr_mmu.c | 4 ++--
drivers/gpu/drm/imagination/pvr_power.c | 14 +++++++-------
5 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/imagination/pvr_device.c b/drivers/gpu/drm/imagination/pvr_device.c
index dbb6f5a8ded1..49696101b547 100644
--- a/drivers/gpu/drm/imagination/pvr_device.c
+++ b/drivers/gpu/drm/imagination/pvr_device.c
@@ -213,7 +213,7 @@ static irqreturn_t pvr_device_irq_thread_handler(int irq, void *data)
while (pvr_fw_irq_pending(pvr_dev)) {
pvr_fw_irq_clear(pvr_dev);
- if (pvr_dev->fw_dev.booted) {
+ if (pvr_dev->fw_dev.initialised) {
pvr_fwccb_process(pvr_dev);
pvr_kccb_wake_up_waiters(pvr_dev);
pvr_device_process_active_queues(pvr_dev);
diff --git a/drivers/gpu/drm/imagination/pvr_fw.c b/drivers/gpu/drm/imagination/pvr_fw.c
index 288516dc2560..b8ad3f1d222c 100644
--- a/drivers/gpu/drm/imagination/pvr_fw.c
+++ b/drivers/gpu/drm/imagination/pvr_fw.c
@@ -1004,7 +1004,7 @@ pvr_fw_init(struct pvr_device *pvr_dev)
goto err_fw_stop;
}
- fw_dev->booted = true;
+ fw_dev->initialised = true;
return 0;
@@ -1044,7 +1044,7 @@ pvr_fw_fini(struct pvr_device *pvr_dev)
{
struct pvr_fw_device *fw_dev = &pvr_dev->fw_dev;
- fw_dev->booted = false;
+ fw_dev->initialised = false;
pvr_fw_destroy_structures(pvr_dev);
pvr_fw_object_unmap_and_destroy(pvr_dev->kccb.rtn_obj);
diff --git a/drivers/gpu/drm/imagination/pvr_fw.h b/drivers/gpu/drm/imagination/pvr_fw.h
index 1404dd492d7c..3390c84e4fd3 100644
--- a/drivers/gpu/drm/imagination/pvr_fw.h
+++ b/drivers/gpu/drm/imagination/pvr_fw.h
@@ -295,8 +295,11 @@ struct pvr_fw_device {
/** @mem: Structure containing objects representing firmware memory allocations. */
struct pvr_fw_mem mem;
- /** @booted: %true if the firmware has been booted, %false otherwise. */
- bool booted;
+ /**
+ * @initialised: %true if the firmware has been successfully initialised,
+ * %false otherwise.
+ */
+ bool initialised;
/**
* @processor_type: FW processor type for this device. Must be one of
diff --git a/drivers/gpu/drm/imagination/pvr_mmu.c b/drivers/gpu/drm/imagination/pvr_mmu.c
index 2e4da5b2c499..e9fefcc4e234 100644
--- a/drivers/gpu/drm/imagination/pvr_mmu.c
+++ b/drivers/gpu/drm/imagination/pvr_mmu.c
@@ -133,8 +133,8 @@ int pvr_mmu_flush_exec(struct pvr_device *pvr_dev, bool wait)
if (!drm_dev_enter(from_pvr_device(pvr_dev), &idx))
return -EIO;
- /* Can't flush MMU if the firmware hasn't booted yet. */
- if (!pvr_dev->fw_dev.booted)
+ /* Can't flush MMU if the firmware hasn't been initialised yet. */
+ if (!pvr_dev->fw_dev.initialised)
goto err_drm_dev_exit;
cmd_mmu_cache_data->cache_flags =
diff --git a/drivers/gpu/drm/imagination/pvr_power.c b/drivers/gpu/drm/imagination/pvr_power.c
index 88fcce433d12..a73a6815306b 100644
--- a/drivers/gpu/drm/imagination/pvr_power.c
+++ b/drivers/gpu/drm/imagination/pvr_power.c
@@ -216,7 +216,7 @@ pvr_watchdog_worker(struct work_struct *work)
if (pm_runtime_get_if_in_use(from_pvr_device(pvr_dev)->dev) <= 0)
goto out_requeue;
- if (!pvr_dev->fw_dev.booted)
+ if (!pvr_dev->fw_dev.initialised)
goto out_pm_runtime_put;
stalled = pvr_watchdog_kccb_stalled(pvr_dev);
@@ -378,8 +378,8 @@ pvr_power_device_suspend(struct device *dev)
if (!drm_dev_enter(drm_dev, &idx))
return -EIO;
- if (pvr_dev->fw_dev.booted) {
- err = pvr_power_fw_disable(pvr_dev, false, true);
+ if (pvr_dev->fw_dev.initialised) {
+ err = pvr_power_fw_disable(pvr_dev, false);
if (err)
goto err_drm_dev_exit;
}
@@ -408,8 +408,8 @@ pvr_power_device_resume(struct device *dev)
if (err)
goto err_drm_dev_exit;
- if (pvr_dev->fw_dev.booted) {
- err = pvr_power_fw_enable(pvr_dev, true);
+ if (pvr_dev->fw_dev.initialised) {
+ err = pvr_power_fw_enable(pvr_dev);
if (err)
goto err_power_off;
}
@@ -548,7 +548,7 @@ pvr_power_reset(struct pvr_device *pvr_dev, bool hard_reset)
err = pvr_power_fw_disable(pvr_dev, hard_reset, false);
if (!err) {
if (hard_reset) {
- pvr_dev->fw_dev.booted = false;
+ pvr_dev->fw_dev.initialised = false;
WARN_ON(pvr_power_device_suspend(from_pvr_device(pvr_dev)->dev));
err = pvr_fw_hard_reset(pvr_dev);
@@ -556,7 +556,7 @@ pvr_power_reset(struct pvr_device *pvr_dev, bool hard_reset)
goto err_device_lost;
err = pvr_power_device_resume(from_pvr_device(pvr_dev)->dev);
- pvr_dev->fw_dev.booted = true;
+ pvr_dev->fw_dev.initialised = true;
if (err)
goto err_device_lost;
} else {
--
2.43.0
next prev parent reply other threads:[~2026-05-12 6:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 6:47 [PATCH 0/4] drm/imagination: Multiple enhancement Brajesh Gupta
2026-05-12 6:47 ` [PATCH 1/4] drm/imagination: Populate FW common context ID before passing to the FW Brajesh Gupta
2026-05-12 6:47 ` [PATCH 2/4] drm/imagination: Don't timeout job if its fence has been signaled Brajesh Gupta
2026-05-12 6:47 ` Brajesh Gupta [this message]
2026-05-12 6:47 ` [PATCH 4/4] drm/imagination: Access FW initialised state with READ/WRITE_ONCE Brajesh Gupta
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=20260512-b4-context_reset-v1-3-439bee96ed83@imgtec.com \
--to=brajesh.gupta@imgtec.com \
--cc=airlied@gmail.com \
--cc=alessio.belle@imgtec.com \
--cc=alexandru.dadu@imgtec.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frank.binns@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matt.coster@imgtec.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox