[PATCH v3 0/1] media: atomisp: mt9m114: graceful teardown and reprobe fixes

Robert Mast posted 1 patch 2 months ago
drivers/media/i2c/mt9m114.c                   | 118 ++++++++++++++++--
.../media/atomisp/pci/atomisp_csi2_bridge.c   |   1 +
.../staging/media/atomisp/pci/atomisp_v4l2.c  |   3 +
3 files changed, 110 insertions(+), 12 deletions(-)
[PATCH v3 0/1] media: atomisp: mt9m114: graceful teardown and reprobe fixes
Posted by Robert Mast 2 months ago
Hi,

this series addresses unload/reload instability between atomisp and mt9m114
seen on ACPI Bay Trail systems.

Problem summary:
- notifier lifecycle in atomisp could leave stale async state behind,
  breaking subsequent probe/reprobe cycles
- mt9m114 remove path could race async unregister callback ordering
- reprobe after module cycling could fail or crash around endpoint/clock setup

This patch hardens teardown/probe behavior by:
- explicitly unregistering and cleaning atomisp async notifier state
- synchronizing mt9m114 async unregister via completion
- adding safer remove/shutdown handling in mt9m114
- making link-frequency control/validation robust when frequencies are absent
- using safe fallback clocking in the ACPI no-link-frequency path

Observed result on the test platform:
- repeated modprobe -r/modprobe cycles are stable
- no probe oops during the tested unload/reload loops

Changes in v3:
- clarify commit message around teardown/reprobe failure modes
- keep atomisp notifier cleanup in both normal teardown and parse error paths
- keep mt9m114 fallback clocking in the no-link-frequency ACPI path
- refresh cover letter with tested behavior summary

Changes in v2:
- initial split and hardening for atomisp notifier + mt9m114 teardown paths

Robert Mast (1):
  media: atomisp: mt9m114: Graceful teardown atomisp and mt9m114

 drivers/media/i2c/mt9m114.c                   | 118 ++++++++++++++++--
 .../media/atomisp/pci/atomisp_csi2_bridge.c   |   1 +
 .../staging/media/atomisp/pci/atomisp_v4l2.c  |   3 +
 3 files changed, 110 insertions(+), 12 deletions(-)

-- 
2.53.0