[PATCH v7 2/2] drm/tiny: add driver for Apple Touch Bars in x86 Macs

Thomas Zimmermann tzimmermann at suse.de
Mon Mar 3 15:45:33 UTC 2025


Hi

Am 27.02.25 um 10:42 schrieb Aditya Garg:
>
>> On 27 Feb 2025, at 3:04 PM, Thomas Zimmermann <tzimmermann at suse.de> wrote:
>>
>> Hi
>>
>>> Am 26.02.25 um 17:04 schrieb Aditya Garg:
>>> From: Kerem Karabay <kekrby at gmail.com>
>>>
>>> The Touch Bars found on x86 Macs support two USB configurations: one
>>> where the device presents itself as a HID keyboard and can display
>>> predefined sets of keys, and one where the operating system has full
>>> control over what is displayed.
>>>
>>> This commit adds support for the display functionality of the second
>>> configuration. Functionality for the first configuration has been
>>> merged in the HID tree.
>>>
>>> Note that this driver has only been tested on T2 Macs, and only includes
>>> the USB device ID for these devices. Testing on T1 Macs would be
>>> appreciated.
>>>
>>> Credit goes to Ben (Bingxing) Wang on GitHub for reverse engineering
>>> most of the protocol.
>>>
>>> Also, as requested by Andy, I would like to clarify the use of __packed
>>> structs in this driver:
>>>
>>> - All the packed structs are aligned except for appletbdrm_msg_information.
>>> - We have to pack appletbdrm_msg_information since it is requirement of
>>>    the protocol.
>>> - We compared binaries compiled by keeping the rest structs __packed and
>>>    not __packed using bloat-o-meter, and __packed was not affecting code
>>>    generation.
>>> - To maintain consistency, rest structs have been kept __packed.
>>>
>>> I would also like to point out that since the driver was reverse-engineered
>>> the actual data types of the protocol might be different, including, but
>>> not limited to, endianness.
>>>
>>> Link: https://github.com/imbushuo/DFRDisplayKm
>>> Signed-off-by: Kerem Karabay <kekrby at gmail.com>
>>> Co-developed-by: Atharva Tiwari <evepolonium at gmail.com>
>>> Signed-off-by: Atharva Tiwari <evepolonium at gmail.com>
>>> Co-developed-by: Aditya Garg <gargaditya08 at live.com>
>>> Signed-off-by: Aditya Garg <gargaditya08 at live.com>
>>> Signed-off-by: Aun-Ali Zaidi <admin at kodeit.net>
>> Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de>
>>
>> Thanks for the effort. As far as I'm concerned, this driver looks good. If no further comments come in, I can add it to the DRM tree in a few days.
> Thanks a lot Thomas, as well as Andy for reviewing the driver and making it better!

I've merged the driver into the DRM misc tree and it should be available 
in v6.15.

Best regards
Thomas


-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)



More information about the dri-devel mailing list