mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] media: rcar-isp: fix core registration and IRQ lifetime
@ 2026-10-15  0:41 Myeonghun Pak
  2026-10-15  0:41 ` [PATCH v2 1/2] media: rcar-isp: distinguish absent cores from registration failures Myeonghun Pak
  2026-10-15  0:41 ` [PATCH v2 2/2] media: rcar-isp: release the core interrupt before destroying RPPX1 Myeonghun Pak
  0 siblings, 2 replies; 4+ messages in thread
From: Myeonghun Pak @ 2026-10-15  0:41 UTC (permalink / raw)
  To: niklas.soderlund, mchehab, geert+renesas, magnus.damm
  Cc: linux-media, linux-renesas-soc, linux-kernel, ae878000,
	jacopo.mondi+renesas, sakari.ailus

The ISP core IRQ is registered before the RPPX1 object and interrupt
handler state are initialized. On removal, it remains registered until
after the RPPX1 object has been freed. An interrupt handler can therefore
access RPPX1 outside its lifetime.

This series requests the IRQ after its dependencies are initialized and
releases it before destroying RPPX1. It also distinguishes an absent
optional core from a registration failure after core resources have been
prepared.

Patch 1 handles the -ENODEV distinction. Patch 2 moves IRQ registration
and release within the RPPX1 lifetime. The error-handling change comes
first so a failure from the later IRQ request cannot be mistaken for an
absent core after registration has unwound.

Compile-tested with Clang 22.1.2, W=1 (arm64). No runtime testing.

Changes in v2:
- Split the -ENODEV handling into patch 1.
- Explain the RPPX1 allocation, free and pre-lock IRQ accesses in patch 2.
- Combined code changes are identical to v1.

v1: https://lore.kernel.org/r/20261011214448.2043581-1-mhun512@gmail.com

Myeonghun Pak (2):
  media: rcar-isp: distinguish absent cores from registration failures
  media: rcar-isp: release the core interrupt before destroying RPPX1

 drivers/media/platform/renesas/rcar-isp/core.c      | 13 +++++++++----
 drivers/media/platform/renesas/rcar-isp/csisp.c     |  2 ++
 drivers/media/platform/renesas/rcar-isp/risp-core.h |  2 ++
 3 files changed, 13 insertions(+), 4 deletions(-)

base-commit: 238650ef6c7c7cca08e032527329424c9fbd70e5

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-15 12:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-15  0:41 [PATCH v2 0/2] media: rcar-isp: fix core registration and IRQ lifetime Myeonghun Pak
2026-10-15  0:41 ` [PATCH v2 1/2] media: rcar-isp: distinguish absent cores from registration failures Myeonghun Pak
2026-10-15 12:56   ` Niklas Söderlund
2026-10-15  0:41 ` [PATCH v2 2/2] media: rcar-isp: release the core interrupt before destroying RPPX1 Myeonghun Pak

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®