mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/2] media: amphion: fix VPU core lifetime during teardown
@ 2026-09-25 19:17 Myeonghun Pak
  2026-09-25 19:17 ` [PATCH v4 1/2] media: amphion: drain message work before releasing core state Myeonghun Pak
  2026-09-25 19:17 ` [PATCH v4 2/2] media: amphion: prevent unbind while video instances are open Myeonghun Pak
  0 siblings, 2 replies; 3+ messages in thread
From: Myeonghun Pak @ 2026-09-25 19:17 UTC (permalink / raw)
  To: Ming Qian, Ming Qian, Zhou Peng, Mauro Carvalho Chehab
  Cc: Myeonghun Pak, linux-media, linux-kernel, stable, Ijae Kim

vpu_core_unregister() releases the message FIFO buffer and VPU reference
before draining queued message work. An open video instance can also keep
a pointer to devm-allocated core state while sysfs unbind removes the core
or its parent.

The first patch drains message work before releasing core state. The
second prevents manual unbind on both platform drivers and warns if core
removal encounters a live instance.

Changes in v4:
- Resend through git send-email after the v3 Gmail submission altered
  diff headers and whitespace in transit. No code changes.

Changes in v3:
- Resend with intact diff headers after the v2 mail submission wrapped
  the diff --git lines. No code changes.

Changes in v2:
- Move vpu_core_put_vpu() after the work drain.
- Keep runtime PM and mailbox teardown unchanged.
- Address sysfs unbind in a separate patch.

Myeonghun Pak (2):
  media: amphion: drain message work before releasing core state
  media: amphion: prevent unbind while video instances are open

 drivers/media/platform/amphion/vpu_core.c | 18 +++++++++++-------
 drivers/media/platform/amphion/vpu_drv.c  |  1 +
 2 files changed, 12 insertions(+), 7 deletions(-)


base-commit: 4efa625593e1e9c76346232413997556dea1d89f
-- 
2.53.0

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

end of thread, other threads:[~2026-09-25 19:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 19:17 [PATCH v4 0/2] media: amphion: fix VPU core lifetime during teardown Myeonghun Pak
2026-09-25 19:17 ` [PATCH v4 1/2] media: amphion: drain message work before releasing core state Myeonghun Pak
2026-09-25 19:17 ` [PATCH v4 2/2] media: amphion: prevent unbind while video instances are open 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®