Repository navigation
CI only: astaff #2492 + #2230 + #1951 composed on integration/aurora (do not merge) - #2532
Draft
DjDeveloperr wants to merge 14 commits into
Draft
DjDeveloperr wants to merge 14 commits into
DjDeveloperr wants to merge 14 commits into
Conversation
When no PMC rail vote was held, CLPC scheduled idle_work on a deferrable timer, which fires only when the CPU holding that timer wakes for other work. When a single CPU core goes busy while the remaining cores stay in cpuidle, a deferrable timer queued on one of those idle CPUs does not expire, leaving single-threaded memory-bound workloads unobserved with the DRAM controller and SoC fabric stuck at state 0. On T6041 (M4 Max, J616c), a single busy core chasing pointers across DRAM measured ~284 ns per load while idle_work waited on an idle timer CPU, compared to ~166-187 ns once sampled (and ~204 ns on macOS, which raises the CLPC floor for any active CPU load). Commit dcabb8e ("soc: apple: clpc: T6050: sample on time with no vote held") already opted T6050 out of the deferrable timer after observing the same stall there with negligible idle power impact. Switch idle_work from INIT_DEFERRABLE_WORK() to INIT_DELAYED_WORK() so all SoCs sample on time across the 4 ms cadence even when only a lone core is active, and retire the now-redundant per-SoC idle_on_time flag. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
…at init Commit f677f7c ("cpufreq: apple-soc: start with boost enabled") and commit 2ab2548 ("cpufreq: apple-soc: keep boost off by default on T8112") configure apple_soc_cpufreq_driver.boost_enabled before driver registration. However, cpufreq_policy_online() validates the frequency table and computes policy->cpuinfo.max_freq, QoS ceilings, policy->max, and the registered Energy Model before cpufreq_online() synchronizes per-policy boost state via policy_set_boost(). Because cpufreq_frequency_table_cpuinfo() skips CPUFREQ_BOOST_FREQ entries unless both cpufreq_boost_enabled() and policy->boost_enabled are set, leaving policy->boost_enabled false in ->init() clamps initial policy limits and Energy Model entries below the boost OPPs. Propagate cpufreq_boost_enabled() into policy->boost_enabled during apple_soc_cpufreq_init() when boost OPPs are present, preserving the SoC default (including T8112's default-off boost) and runtime sysfs control. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
hwmon_attr_store() holds the chip-wide hwdev->lock across ->write() callbacks. On Apple Silicon machines whose SMC starts fans in system mode (mode 3), transitioning a fan into manual mode via Ftst=1 or releasing Ftst=0 back to firmware control in macsmc_hwmon_set_fan() polls the SMC mode key every 100 ms for up to 10 s (MACSMC_FAN_MODE_TIMEOUT_MS). Holding hwdev->lock across that poll loop blocks all concurrent hwmon reads on the same chip, stalling thermal zone temperature polling (hwmon_thermal_get_temp()) and userspace telemetry for the duration of the SMC mode transition. Fan state transitions and individual SMC key transactions are already serialized by hwmon->fan.lock and smc->mutex, and kernfs pins the sysfs attribute across hwmon_attr_store() until ->write() returns. Drop the chip-wide hwmon lock around macsmc_hwmon_set_fan() in macsmc_hwmon_write_fan() so temperature and power reads proceed without stalling during fan mode transitions. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
T6040 (M4 Pro) and T6041 (M4 Max) share t604x.dtsi's apple,t6041-clpc voter node, while M4 Max's wider memory subsystem adds SoC fabric state 3 and needs its own CLPC policy table. Allow apple,t6041-max-clpc ahead of the apple,t6041-clpc fallback, matching t6041.dtsi's apple,t6041-max-avd convention and T6050's CLPC fallback. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
T6040 (M4 Pro) and T6041 (M4 Max) share the apple,t6041-clpc compatible
in t604x.dtsi, which previously mapped both SoCs to apple_clpc_hw_t6040
(DCS {1, 2, 5, 5}, fabric {0, 1, 2, 2}, sustain = 3).
Unlike M4 Pro (4 AMCCs, 256-bit LPDDR5X-8533, fabric states 0-2), M4
Max's 6/8-AMCC 384/512-bit memory subsystem reaches SoC fabric state 3
(VOVD; ADT clpc fabric-mem-separation-max = 3) for full 410/546 GB/s
bandwidth, and macOS 27.2.1 votes DCS 5 and fabric 3 immediately for
active CPU demand without a multi-sample busy streak, raising 12-thread
CPU DRAM read bandwidth on J616c from ~256 GB/s at fabric state 2 to
~297 GB/s.
Add a dedicated apple_clpc_hw_t6041 table (DCS 5, fabric 3 across all
quartiles, sustain = 0, host GPU input enabled) matched directly via
apple,t6041-max-clpc in apple_clpc_of_match[] while keeping T6040 on
apple,t6041-clpc. Preserve T6041's DCS 5 / fabric 2 ANE floor, move
T6041's 2808 MHz Low Power platform profile ceiling onto
apple_clpc_hw_t6041, and retire the now-unused low_power_machine
selector.
Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
T6041 boards already enable the PMC and CLPC voter interface, but shared t604x.dtsi's apple,t6041-clpc compatible with T6040 and left two links unwired on M4 Max: 1. Give &clpc in t6041.dtsi the apple,t6041-max-clpc compatible ahead of its apple,t6041-clpc fallback (matching &avd) so J614c, J616c, J575c, and any future T6041 board select apple_clpc_hw_t6041 directly from the CLPC node while T6040 stays on apple_clpc_hw_t6040. 2. Link the GPU node in t6041.dtsi to &clpc via apple,clpc, matching t6040.dtsi and t8132-gpu.dtsi, so G17 submissions in flight hold the DRAM controller and SoC fabric floors while GPU work is active. On J616c this raises 256 MiB GPU copy throughput from ~43 GB/s to ~230 GB/s and sustained Vulkan LLM token generation from ~18.9 to ~55.9 tok/s. 3. Declare #cooling-cells = <2> on &pmc in t6041.dtsi and bind &pmc to cpu-die-thermal's passive backstop trip on J614c/J616c so non-power- actor thermal policies such as step_wise can step down the DCS rail if die temperature reaches the backstop behind the PMP fast die loop. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Like T8142 on firmware 27 (43f8980), T6041 internal and external display processors running macOS 27.2 firmware (DCP_FIRMWARE_V_27_0) ignore is_premultiplied and blend the fourth byte of a DCP_FORMAT_BGRA (XRGB8888) surface as straight alpha. On AGX, PIPE_FORMAT_B8G8R8X8_UNORM leaves the 2-bit PBE Swizzle A selector at channel 0 (Red), storing X = R in DRAM and multiplying every displayed pixel by R / 255 — turning R = 0 blues and cyans black while screenshots look right. Extend xrgb_is_alpha to apple,t6041-dcp and apple,t6041-dcpext on DCP_FIRMWARE_V_27_0 so Wayland compositors select ARGB8888/ARGB2101010. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
gate_t6041_internal() already refuses an unapproved firmware-27 internal DCP, so the guard in gate_t6041_max_run() does not leave an internal display enabled; update the log message and KUnit case name to match. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
ane_h16_map() ran ane_h16_dart_protection(b, true) across all H16 profiles, including the 26.x profiles on apple,t6041-ane (T6040/T6041) and apple,t8132-ane. Add require_dart_unlocked to struct ane_h16_profile and enable it on the H16 27.2 (26B123) profile so all H16 boards still log the three DART protection words at map time while 26.x profiles keep their prior MAP admission. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
check_fw_regions() accepted a second translated memory-region on any apple,t6041-aop or apple,t8132-aop board before probe checked whether the firmware's bootarg table declared ED0p. Inspect the bootarg table upfront with bootargs_has_ed0p() and pass allow_ed0p into check_fw_regions() so a translated region outside EC0p is refused before AopData::new() unless a single 8-byte ED0p entry is present. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Register a CEC adapter for fixed HDMI-A connectors served by the compact EPIC CEC endpoint (0x2b). Accept both bare and descriptor-wrapped service-call reports. Use group 0 calls to open and close the service, set logical addresses, read the physical address and transmit frames. Handle group 2 reports for received frames, HPD, EDID attributes and service termination. HPD status can still read low on plug. Query the physical address on open and refresh it on an EDID attributes report or after the hotplug EDID read. Close the client before forwarding HPD low and drain pending work before unregistering the adapter. Track each transmit by sequence so a late reply cannot complete a later frame. Classify short HPD pulses in hard IRQ context with a 2 ms timer. Wake the threaded handler for a sustained low. Add parser, adapter and HPD test coverage. Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
Contributor
|
Early note on this draft (no full review yet): This is a CI-only composition, so both points belong in the component PRs (#2492 and #1951). They are listed here because they show up in the combined tree.
Assisted-by: LLM (Claude:Opus 5.5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI only, not for merging. It runs astaff's open follow-up PRs together on the current integration/aurora, because integration has moved since their own CI runs and touches their files (ANE H16 backend, dcp-fabric, dcp.c, dcp-v27-sleep.inc, clpc.c, t6041.dtsi). This gives the combination a
kunit/rust-build/ DWC3 build, the host tests and the DT checks on today's base.Composition (
056b65d18c55, treeed807723ed9c):e0ee46a18e33b224fde721f1(T6041 firmware-27 XRGB alpha + arm64: apple: t6041: support J616c (M4 Max) on macOS 27.2 (26B123) firmware #1954 follow-ups)75773377faae(native HDMI-CEC + IRQ_HPD pulse tracking)511576514e0f(T6041 CLPC / cpufreq / macsmc fan lock)No conflicts. The same source is the Neo test kernel for these PRs. This PR will be closed once they have been decided.
🤖 Generated with Claude Code