Repository navigation
Conversation
The SMC firmware included in macOS 27 changed the size of BCF0 key from 4 to 1 bytes. This key is used for indicating that battery state is critically low. In addition, B0RM key has changed endianness. Reviewed-by: Sven Peter <sven@kernel.org> Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com> Reviewed-by: Janne Grunau <j@jannau.net> Cc: stable@vger.kernel.org Fixes: 0ebf821 ("power: supply: Add macsmc-power driver for Apple Silicon") Signed-off-by: Sasha Finkelstein <k@chaosmail.tech> Link: https://patch.msgid.link/20260712-gate-power-v4-1-aa59c6583247@chaosmail.tech Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Certain Broadcom bluetooth chips (bcm4377/bcm4378/bcm438) need ACL streams carrying audio to be set as "high priority" using a vendor specific command to prevent 10-ish second-long dropouts whenever something does a device scan. This patch sends the command when the socket priority is set to TC_PRIO_INTERACTIVE, as BlueZ does for audio. Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
The current approach of silently disabling all rust drivers if the toolchain is missing results in users that try to compile their own kernels getting a "successful" build and then being confused about where did their drivers go. In comparison, missing openssl results in a build failure, not a disappearance of everything that depends on it. This also means that allyesconfig will depend on rust, but since the rust experiment concluded with "rust is here to stay", i believe that allyesconfig should be building rust drivers too. Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
Signed-off-by: Janne Grunau <j@jannau.net>
Apple M3 Pro and Max devices are using 'gp00' keys for GPIO in addition to 'gP00' keys. Add a second compatible to handle this keys with an additional macsmc-gpio instance. Signed-off-by: Janne Grunau <j@jannau.net>
Add support for SMC GPIO keys with a lower letter 'p' via the "apple,smc-low-gpio" compatible. This adds support for a second macsmc-gpio controller using 'gp00' keys. These keys are used on Apple M3 Pro and Max MacBooks in the controller for keyboard and trackpad and for the built-in DisplayPort to HDMI converter. Signed-off-by: Janne Grunau <j@jannau.net>
Apple M3 Pro and Max devices are using 'gp00' keys for GPIO in addition to 'gP00' keys. These keys are handled by an additional macsmc-gpio instance using the "apple,smc-low-gpio" compatible. Signed-off-by: Janne Grunau <j@jannau.net>
HDP status for DisplayPort alt-mode is signaled data_status. Track changes to have a debounced HPD to forward to the DRM KMS driver. Signed-off-by: Janne Grunau <j@jannau.net>
Enable DP alt mode for the front left USB-C port of Macbook Air 13 (M2, 13/15-inch) and Macbook Pro (M2, 13-inch). Can't easily enabled on on the M2 Mac Mini since dcpext is used for the HDMI port and dcp bringup is troublesome. Signed-off-by: Janne Grunau <j@jannau.net>
Works around missing suspend/resume handling in ATC phy for DP-altmode. Signed-off-by: Janne Grunau <j@jannau.net>
Needs more testing, maybe a little unstable and somehow limits the HDMI out to 1280x720 (to be verified). Using dcp as display coproc since dcpext is used for the HDMI port. Signed-off-by: Janne Grunau <j@jannau.net>
Works around missing suspend/resume handling in ATC phy for DP-altmode. Signed-off-by: Janne Grunau <j@jannau.net>
Blessed dp-altmode port is front left port on j314/j316/j414/j416. Signed-off-by: Janne Grunau <j@jannau.net>
…ways on Works around missing suspend/resume handling in ATC phy for DP-altmode. Signed-off-by: Janne Grunau <j@jannau.net>
DP alt mode for Mac Studio, the blessed port is the back left middle port (second closest USB-C port to the power connector). Signed-off-by: Janne Grunau <j@jannau.net>
…s on Works around missing suspend/resume handling in ATC phy for DP-altmode. Signed-off-by: Janne Grunau <j@jannau.net>
DP alt mode for Mac Mini M2 Pro, the blessed port is the back right middle port (second closest USB-C port to the power connector). Signed-off-by: Janne Grunau <j@jannau.net>
On bootup, an Apple MacBook Pro (13-inch, M2, 2022) dmesg shows: dcp-dp-audio 238334000.audio-controller: No DMA device And: $ cat /proc/device-tree/soc/sio@236400000/status disabled This model's t8112-j493 hardware is able to encode this data through its SIO coprocessor, but the device tree doesn't configure it to be able to. Similar to t8112-j473, enable the node and assign the sio alias so m1n1 injects the correct firmware. With this applied the sink is available: ~ cat /proc/asound/cards 0 [DisplayPort ]: apple_dcp - Apple DisplayPort Apple DisplayPort ... And audio works correctly over DP and is stable. Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
|
I do not think we want it to be generally available yet, whether it is stable or not highly depends on which device is on the other side of the dp link. |
|
Ack fair enough, I have tested a Samsung LS49AG95 which is working fine, but I did notice some (minor) instability immediately after sending this (typical) - the audio dropped after I switched from 120 Hz -> 60 Hz requiring a pipewire restart that fixed it. I also noticed (not audio obviously but DP-related) it seems to have issues with 10-bit colour depth at 120 Hz, resulting in compression and visual artifacts, so have forced to 60 Hz, will try a hack locally to force 8 bit to see if that fixes that. Obviously intending this one for the fairydust branch but understood if you'd rather avoid possible instability with this even on that. Will report any other bugs I notice with this setup, is rapidly becoming a daily driver for me now... :) |
|
If i found the right monitor - isn't that expected? 5120x1440@120hz with 10bpp is just slightly above dp 1.4 speed, so it needs either subsampling or dsc, and i am not sure if we do that correctly. |
|
yeah it just seems the G9 isn't brilliant at rendering the compressed signal :) and it seems that 8 bit isn't available as an option as currently implemented? I've put in a hack to force 8 bit which seems to have fixed it. But obviously the real fix would be to make that otherwise available. |
|
Hi, just out of curiosity I tried this branch. My machine is a MacBook Pro 13 M2. but the device won't show up as a sink. In dmesg I see For reference: I tried with a iiyama Prolite XCB4594DQSN-B1 Monitor. |
|
@nr23730 you need appledrm.hdmi_audio=1 on the kernel command line too if you don't have that set. I've had to do a lot of fiddling locally to get it working, @WhatAmISupposedToPutHere is right that this isn't really in a stable state yet :) |
|
Thanks! Now it shows up. |
|
Hm though @WhatAmISupposedToPutHere aren't all uses of DP audio gated on this kernel parameter anyway, and also in an experimental branch, so does it make sense to take this change to reflect the fact that it's a valid setting, if experimental for t8112-j493? Are other hardware that has the SIO set like t8112-j473 all tested and confirmed working? What kind of testing would you need me to do to confirm my hardware? Is there much of a delta between this hardware and other hardware? All the flakes I've seen have been about audio-over-DP and the DP stuff in general, especially handling connect/disconnect and even more so suspend/wake. I haven't seen anything that points specifically to this hardware and when just used without connecting/disconnecting has worked flawlessly. |
|
Fair, the issues are not model-specific, i think this one was just missed, since it is not enabled in general. |
|
manually merged differently and hopefully enabling DP audio for all M2/T8112 devices one the DP-altmode port. The M2 Macbook Airs were missing the same change and the M2 Mac mini did not enable |
|
Any hint as to which of the rebased commits achieve the same thing @jannau or is it just a rebase and go away?... Not a very friendly way of resolving this PR. I guess I'll keep future stuff to my local branch. |
|
This is now a part of ad272ad . Sorry about the miscommunication, if you wanted it resolved some other way - tell us, there was no intent to "rebase and go away", it is just that the way this repo is managed is by heavily using git history rewrite features. |
|
Thanks @WhatAmISupposedToPutHere , I understand the rebasing but a simple 'hey - I think doing x,y,z will fix this for your hardware and [other hardware] - have rebased, could you check?' would be a lot nicer than 'manually merged differently and hopefully enabling DP audio' close The vibe is dismissal and that's not encouraging contributions. (I'm a kernel maintainer so I'm used to 'robust' comms, but also this is a contribution back in my personal time in genuinely good faith so y'know.) |
|
I see, it seems like the issue that the "script" for internal contributors (where everyone already knows what branch to look at and where changes are supposed to end up) was applied to you, while a different one should have been applied in this case. Again, sorry about that, it is something that fell through. |
|
Anyway rebased on the branch and can confirm it works thanks |
On bootup, an Apple MacBook Pro (13-inch, M2, 2022) dmesg shows:
And:
This model's t8112-j493 hardware is able to encode this data through its SIO coprocessor, but the device tree doesn't configure it to be able to.
Similar to t8112-j473, enable the node and assign the sio alias so m1n1 injects the correct firmware.
With this applied the sink is available:
And audio works correctly over DP and is stable.