Skip to content

media: amd: isp4: fix error handling in isp4sd_pwron_and_init()

Yifei Gao linux-media lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 2 repliesIn review
  2. v42 patches 1 replySuperseded
  3. v32 patches 1 replySuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v21 patch1 replySuperseded
v11 patch1 replySuperseded

Changes in v5 from the cover letter

- Made isp4if_gpu_mem_free() silent on NULL entries, which are expected during partial-allocation cleanup, per Bin Du's review.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2media: amd: isp4: release partial allocations in isp4if_alloc_fw_gpumem()drivers/media/platform/amd/isp4/isp4_interface.c+2 -41 reply
2/2media: amd: isp4: fix self-deadlock in isp4sd_pwron_and_init() error pathdrivers/media/platform/amd/isp4/isp4_subdev.c+22 -61 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchBin Du
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/2] media: amd: isp4: fix error handling in isp4sd_pwron_and_init()

This series fixes the error handling in isp4sd_pwron_and_init().

Patch 1 makes isp4if_alloc_fw_gpumem() release partial allocations on failure, an independent leak that was previously masked by the deadlock fixed in patch 2.

Patch 2 reworks the power-on error path into staged cleanup, fixing the self-deadlock and, once it is gone, the runtime-PM imbalance and unpowered MMIO access. The staged path relies on isp4if_start() cleaning up fully on failure, which patch 1 completes, so patch 1 comes first.

Changes since v4:
- Made isp4if_gpu_mem_free() silent on NULL entries, which are expected during partial-allocation cleanup, per Bin Du's review.

Changes since v3:
- Trimmed the commit message of patch 2 per Sakari's review; no functional change.

Changes since v2:
- Added patch 1 to release partial allocations in isp4if_alloc_fw_gpumem(), as pointed out by Bin Du.
- Patch 2 is otherwise unchanged from v2.

v4: https://lore.kernel.org/linux-media/[email protected]/
v3: https://lore.kernel.org/linux-media/[email protected]/
v2: https://lore.kernel.org/linux-media/[email protected]/
v1: https://lore.kernel.org/linux-media/[email protected]/

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  |  6 ++--
 drivers/media/platform/amd/isp4/isp4_subdev.c | 28 +++++++++++++++----
 2 files changed, 24 insertions(+), 10 deletions(-)
Signature · 1 line
2.43.0