From: Yifei Gao <gyf161023@gmail.com>
To: Bin Du <bin.du@amd.com>,
Nirujogi Pratap <pratap.nirujogi@amd.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Sultan Alsawaf <sultan@kerneltoast.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Yifei Gao <gyf161023@gmail.com>
Subject: [PATCH v3 0/2] media: amd: isp4: fix error handling in isp4sd_pwron_and_init()
Date: Tue, 28 Jul 2026 14:16:48 +0000 [thread overview]
Message-ID: <20260728141659.62310-1-gyf161023@gmail.com> (raw)
In-Reply-To: <20260727183500.298036-1-gyf161023@gmail.com>
This series fixes the error handling in isp4sd_pwron_and_init().
Patch 1 makes isp4if_alloc_fw_gpumem() release partial allocations on
failure. This is an independent leak that was previously masked by the
deadlock fixed in patch 2: the thread deadlocked before the teardown
that would have freed the buffers could run.
Patch 2 reworks the power-on error path into staged cleanup. This fixes
the self-deadlock and, once the deadlock is removed and the error path
actually runs, the runtime-PM usage-count imbalance and the MMIO access
while unpowered that were previously unreachable.
The staged error path in patch 2 relies on isp4if_start() cleaning up
fully on failure, which patch 1 completes, so patch 1 comes first.
Changes since v2:
- Added patch 1 to release partial allocations in
isp4if_alloc_fw_gpumem(), as pointed out by Bin Du.
- Patch 2 (the power-on staged cleanup) is unchanged from v2.
v2: https://lore.kernel.org/linux-media/20260727183500.298036-1-gyf161023@gmail.com/
v1: https://lore.kernel.org/linux-media/20260725203640.915626-1-gyf161023@gmail.com/
Yifei Gao (2):
media: amd: isp4: release partial allocations in
isp4if_alloc_fw_gpumem()
media: amd: isp4: fix self-deadlock in isp4sd_pwron_and_init() error
path
.../media/platform/amd/isp4/isp4_interface.c | 1 +
drivers/media/platform/amd/isp4/isp4_subdev.c | 28 +++++++++++++++----
2 files changed, 23 insertions(+), 6 deletions(-)
--
2.43.0
next prev parent reply other threads:[~2026-07-28 14:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 20:36 [PATCH] media: amd: isp4: fix self-deadlock in power-on error path Yifei Gao
2026-07-27 3:32 ` Bin Du
2026-07-27 18:34 ` [PATCH v2] media: amd: isp4: fix self-deadlock in isp4sd_pwron_and_init() " Yifei Gao
2026-07-28 10:17 ` Bin Du
2026-07-28 14:16 ` Yifei Gao [this message]
2026-07-28 14:16 ` [PATCH v3 1/2] media: amd: isp4: release partial allocations in isp4if_alloc_fw_gpumem() Yifei Gao
2026-07-28 14:16 ` [PATCH v3 2/2] media: amd: isp4: fix self-deadlock in isp4sd_pwron_and_init() error path Yifei Gao
2026-07-28 17:35 ` Sakari Ailus
2026-07-28 19:07 ` [PATCH v4 0/2] media: amd: isp4: fix error handling in isp4sd_pwron_and_init() Yifei Gao
2026-07-28 19:07 ` [PATCH v4 1/2] media: amd: isp4: release partial allocations in isp4if_alloc_fw_gpumem() Yifei Gao
2026-07-30 9:57 ` Bin Du
2026-07-28 19:07 ` [PATCH v4 2/2] media: amd: isp4: fix self-deadlock in isp4sd_pwron_and_init() error path Yifei Gao
2026-07-30 14:14 ` [PATCH v5 0/2] media: amd: isp4: fix error handling in isp4sd_pwron_and_init() Yifei Gao
2026-07-30 14:14 ` [PATCH v5 1/2] media: amd: isp4: release partial allocations in isp4if_alloc_fw_gpumem() Yifei Gao
2026-08-03 7:22 ` Bin Du
2026-07-30 14:14 ` [PATCH v5 2/2] media: amd: isp4: fix self-deadlock in isp4sd_pwron_and_init() error path Yifei Gao
2026-08-03 7:22 ` Bin Du
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=20260728141659.62310-1-gyf161023@gmail.com \
--to=gyf161023@gmail.com \
--cc=bin.du@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=pratap.nirujogi@amd.com \
--cc=sakari.ailus@linux.intel.com \
--cc=sultan@kerneltoast.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®