History log of /linux-6.15/drivers/gpu/drm/tiny/appletbdrm.c (Results 1 – 3 of 3)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6
# 914ee6e7 07-Mar-2025 Thomas Zimmermann <[email protected]>

drm/appletbdrm: Fix ref-counting on dmadev

Remove the put_device() call on dmadev. The driver sets the field
without getting a reference, so it shouldn't put a reference either.
The dmadev field poi

drm/appletbdrm: Fix ref-counting on dmadev

Remove the put_device() call on dmadev. The driver sets the field
without getting a reference, so it shouldn't put a reference either.
The dmadev field points to the regular USB device for which DRM
maintains a reference internally. Hence dmadev will not become dangling
during the DRM device's lifetime.

Signed-off-by: Thomas Zimmermann <[email protected]>
Fixes: 0670c2f56e45 ("drm/tiny: add driver for Apple Touch Bars in x86 Macs")
Cc: Aditya Garg <[email protected]>
Cc: Aun-Ali Zaidi <[email protected]>
Cc: [email protected]
Acked-by: Aditya Garg <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]

show more ...


# c449f506 04-Mar-2025 Nathan Chancellor <[email protected]>

drm/appletbdrm: Fix format specifier for size_t variables

When building for a 32-bit platform, there are some warnings (or errors
with CONFIG_WERROR=y) due to an incorrect specifier for 'size_t'
var

drm/appletbdrm: Fix format specifier for size_t variables

When building for a 32-bit platform, there are some warnings (or errors
with CONFIG_WERROR=y) due to an incorrect specifier for 'size_t'
variables, which is typedef'd as 'unsigned int' for these architectures:

drivers/gpu/drm/tiny/appletbdrm.c:171:17: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
170 | drm_err(drm, "Actual size (%d) doesn't match expected size (%lu)\n",
| ~~~
| %zu
171 | actual_size, size);
| ^~~~
...
drivers/gpu/drm/tiny/appletbdrm.c:212:17: error: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
211 | drm_err(drm, "Actual size (%d) doesn't match expected size (%lu)\n",
| ~~~
| %zu
212 | actual_size, size);
| ^~~~

Use '%zu' as suggested, clearing up the warnings.

Fixes: 0670c2f56e45 ("drm/tiny: add driver for Apple Touch Bars in x86 Macs")
Signed-off-by: Nathan Chancellor <[email protected]>
Reviewed-by: Jani Nikula <[email protected]>
Acked-by: Aditya Garg <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20250304-appletbdrm-fix-size_t-specifier-v1-1-94fe1d2c91f8@kernel.org
Signed-off-by: Jani Nikula <[email protected]>

show more ...


Revision tags: v6.14-rc5
# 0670c2f5 26-Feb-2025 Kerem Karabay <[email protected]>

drm/tiny: add driver for Apple Touch Bars in x86 Macs

The Touch Bars found on x86 Macs support two USB configurations: one
where the device presents itself as a HID keyboard and can display
predefin

drm/tiny: add driver for Apple Touch Bars in x86 Macs

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 <[email protected]>
Co-developed-by: Atharva Tiwari <[email protected]>
Signed-off-by: Atharva Tiwari <[email protected]>
Co-developed-by: Aditya Garg <[email protected]>
Signed-off-by: Aditya Garg <[email protected]>
Signed-off-by: Aun-Ali Zaidi <[email protected]>
Reviewed-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]

show more ...