public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Robert Mast <rn.mast@zonnet.nl>
To: hansg@kernel.org
Cc: mchehab@kernel.org, sakari.ailus@linux.intel.com,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	andy@kernel.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com,
	Robert Mast <rn.mast@zonnet.nl>
Subject: [PATCH v3 0/1] media: atomisp: mt9m114: graceful teardown and reprobe fixes
Date: Sun, 19 Apr 2026 17:25:13 +0200	[thread overview]
Message-ID: <20260419152546.78513-1-rn.mast@zonnet.nl> (raw)

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


             reply	other threads:[~2026-04-19 15:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-19 15:25 Robert Mast [this message]
2026-04-19 15:25 ` [PATCH v3 1/1] media: atomisp: mt9m114: graceful teardown and reprobe fixes Robert Mast
2026-04-19 17:42   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260419152546.78513-1-rn.mast@zonnet.nl \
    --to=rn.mast@zonnet.nl \
    --cc=andy@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox