[PATCH v2 0/2] media: amphion: fix VPU core lifetime during teardown
From: Myeonghun Pak
Date: Thu Sep 24 2026 - 17:50:02 EST
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 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(-)
--
2.53.0