Repository navigation
Conversation
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
JJRPF
left a comment
There was a problem hiding this comment.
Reviewed the diff (t602x-die0.dtsi, apple-dart.c, pmp-export.c, mca.c, tas2764.c):
-
ane_dart0power-domain fix,apple_dart_sleep_prepare()fallback save whenapple,sleep-restoreis absent, and MCAfmt_lost/ TAS2764sdz_gpioaudio resume all look clean. -
One catch in
drivers/soc/apple/pmp-export.c:at_commit = READ_ONCE(defer_commit) && apple_pmp_commit_available(dev);
apple_sleep_commit_stops_coprocs()was dropped here. Without it, whendefer_commit=1(the default) and a firmware sleep runs without the sleep driver's commit (e.g. PSCISYSTEM_SUSPENDwhensleep-controlleris enabled in DT),at_commitstill evaluatestrueand leaves PMP running into a commit that never callslast_stop, causing a WD2 reset.Keeping
apple_sleep_commit_stops_coprocs()in the condition fixes both paths:bool defer = READ_ONCE(defer_commit) && apple_sleep_commit_stops_coprocs(); at_commit = defer && apple_pmp_commit_available(dev); if (!at_commit && defer) { dev_err(dev, "no stop at the sleep's commit: refusing the sleep\n"); return -EBUSY; }
We'll follow up with a second-unit J414s hardware verification row after rebasing onto main + this PR.
|
J414c M2 Max (T6021) at |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed eef8428. The ane_dart0 power-domain fix, the MCA format rewrite and the TAS2764 sdz_gpio resume look right. Two blockers:
-
pmp-export.c: defer_commit is a module parameter, and J414s deep sleep only works with it set to 0 on the command line. Merged code has to pick its behaviour itself, with the default command line. Please select the early (suspend_late) PMP idle from what the hardware or DT says about this PMP, for example a property on the T6020 PMP node, and drop the parameter. With the default (1) the logic matches main, so the WD2 case raised in the earlier review comes from main's code and is not new here.
-
apple-dart.c: apple_dart_sleep_prepare() is documented as doing nothing without apple,sleep-restore (comment above it), and its callers (atc.c, pm_shim.c) only use it on listed DARTs. The new fallback sets sleep_saved on unlisted DARTs, which makes the DART's own noirq suspend and resume skip their save and reset, yet nothing in this PR calls it on an unlisted DART. Please move this change to the PR that adds the DCP disp0 caller, with the doc comment updated, so the new contract and its user land together.
Suggestion: split the t602x-die0.dtsi fix into its own PR. It is a clear bug fix, and the J414c row already shows ane_dart0 on ane_sys with all three ANE DARTs bound, so it can merge on its own. The PR text also needs the What/Tested/Risk/Not yet sections (needs-template label).
eef8428 to
a4a7d01
Compare
|
@DjDeveloperr Thank you for the clear review! Updated #3811 to address all points (head is now
#3811 is now scoped strictly to the ASoC |
|
Hit a kernel NULL pointer dereference in Because Unlike the IRQ handler (which checks |
|
Follow-up on the Guarding
|
a4a7d01 to
336d7af
Compare
|
@JJRPF Good catch on the
@DjDeveloperr Re-requesting review at |
|
@patatman Thanks for the quick fix! The |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Re-reviewed 336d7afef270. Both earlier blockers are gone: the defer_commit parameter and the DART fallback are out of this PR. The rest looks right to me:
mca.c:fmt_lostis set for every cluster only on a firmware resume. The format is written again at the next prepare, once the cluster's power domain is up.set_fmtwrites the same registers it wrote before, now through one helper.tas2764.c: a GPIO-only amp now takes the power-on restore after a firmware sleep (soft reset, page drop, cache sync, quirks). If that fails, it stays shut down (SDZ low, cache-only, dirty) instead of dereferencing the NULLsdz_group. There's nosdz_regon those amps, so no regulator count can go wrong, and s2idle is unchanged.
Local checks at this head (arm64, LLVM=1): W=1 build of sound/soc/apple/mca.o and sound/soc/codecs/tas2764.o gives 0 warnings.
Two things are left before merge:
- The commit has no
Signed-off-by.checkpatch.pl --strictreports it as its only error, and our rules need the author's own DCO sign-off on every commit. Only you can add it:git commit --amend -sand a force push of your own branch is fine here. - Hardware rows at the new head. Firmware deep sleep isn't on main for T6020 yet, so the row has to come from a T6020 deep-sleep stack plus this exact head: J414s, speakers at 5 % volume and headphones after two or more deep sleeps. mca and tas2764 are shared, so one more Mac with firmware deep sleep is needed too (J714s), to show audio comes back with no I2C errors.
|
J414s (MacBook Pro 14" M2 Pro, T6020) hardware verification on
|
On Macs whose TAS2764 amplifiers are controlled directly by an SDZ GPIO (without a shared sdz_group), a firmware-driven deep sleep (SLP_S2R) powers off the pin controller and drops the SDZ line, resetting every amp to its power-on defaults. Include tas2764->sdz_gpio alongside tas2764->sdz_group in the power_on check in tas2764_codec_resume() so GPIO-controlled amps also run the power-on soft reset, page-register cache drop, regcache sync, and init quirks after firmware S2R. Guard tas2764->sdz_group in tas2764_restore_failed() so an I2C failure on a GPIO-controlled amp drives SDZ low and keeps regcache cache-only and dirty instead of dereferencing a NULL sdz_group in tas2764_group_shutdown(). Signed-off-by: Pim Jeursen <pim@jeursen.nl>
336d7af to
b8c8bb0
Compare
|
@DjDeveloperr Updated
Testing |
RyanTheTide
left a comment
There was a problem hiding this comment.
GPIO-only amps now take the reset and cache restore path on firmware resume. If restore fails, the direct SDZ line is driven low and regcache stays dirty and cache-only. The shared-group and s2idle paths retain their existing behavior. Exact hardware checks are still pending.
What: Treat GPIO-controlled TAS2764 amps (
sdz_gpio) the same assdz_groupamps onpm_resume_via_firmware(), and guardtas2764->sdz_groupintas2764_restore_failed()so an I2C failure on a GPIO-controlled amp drives SDZ low and keeps regcache cache-only/dirty instead of dereferencing a NULLsdz_group. Ref #3336Tested: Rebased onto
main(c09b61228, droppingsound/soc/apple/mca.cnow thata8d2f37caf89caches and replays MCA DAI format) atb8c8bb060withcheckpatch.pl --strict(0 errors) andLLVM=1build ofsound/soc/codecs/tas2764.o(0 warnings). Prior identicaltas2764.cdiff verified on J414s (M2 Pro, T6020): 4x consecutive hardwareSLP_S2Rwakes on our desktop stack and @JJRPF's C82linux@main+#3811wake (rc=0,WARN=0, zero audio/I2C errors). Exact-headb8c8bb060J414s 2x deep-sleep speaker (5% vol) + headphones check running next alongside #3999.Risk: two-way door · Apple Silicon Macs with GPIO-controlled
tas2764(sdz_gpio, nosdz_group) using firmware-driven deep sleep (pm_resume_via_firmware()); no change ons2idleNot yet: Exact-head
b8c8bb060J414s 2x deep-sleep speakers (5%) + headphones hardware row, and a second-generation firmware-S2R Mac row (e.g. J714s).Details
sound/soc/codecs/tas2764.c:power_onintas2764_codec_resume()fromtas2764->sdz_group && pm_resume_via_firmware()to(tas2764->sdz_group || tas2764->sdz_gpio) && pm_resume_via_firmware()so shutdown-GPIO amps also get a clean power-on soft reset, page-register cache drop, regcache sync, and init quirks after firmware S2R.tas2764->sdz_groupintas2764_restore_failed(): whensdz_group == NULLandsdz_gpiois present, drivesdz_gpiolow (0) and mark regcache cache-only and dirty instead of callingtas2764_group_shutdown()on a NULL group.sound/soc/apple/mca.con rebase becausea8d2f37caf89onmainalready cachesserdes_bclk_pol/tx_bitstart/rx_bitstartinmca_fe_set_fmt()and reprograms them inmca_configure_serdes()/mca_fe_hw_params().Based on @JJRPF's
aurora-deepidlepatch series. Thanks to @DjDeveloperr, @JJRPF, and @muness for the review, bug catch, and testing.Evidence
scripts/checkpatch.pl --strictatb8c8bb060: 0 errors.sound/soc/codecs/tas2764.o(snd-soc-tas2764.ko) compiles cleanly withLLVM=1(0 warnings).main+#3999+b8c8bb060.