Skip to content

Commit 6143ef3

Browse files
committed
t2
Signed-off-by: Peter Jung <admin@ptr1337.dev>
1 parent 05b71c5 commit 6143ef3

57 files changed

Lines changed: 10672 additions & 351 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2343,6 +2343,9 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
23432343
int ret, retry = 0, i;
23442344
bool supports_atomic = false;
23452345

2346+
if (vga_switcheroo_client_probe_defer(pdev))
2347+
return -EPROBE_DEFER;
2348+
23462349
if ((pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA ||
23472350
(pdev->class >> 8) == PCI_CLASS_DISPLAY_OTHER) {
23482351
if (drm_firmware_drivers_only() && amdgpu_modeset == -1)

drivers/gpu/drm/i915/display/intel_ddi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4868,6 +4868,9 @@ static bool intel_ddi_a_force_4_lanes(struct intel_digital_port *dig_port)
48684868
if (dig_port->ddi_a_4_lanes)
48694869
return false;
48704870

4871+
if (intel_has_quirk(display, QUIRK_DDI_A_FORCE_4_LANES))
4872+
return true;
4873+
48714874
/* Broxton/Geminilake: Bspec says that DDI_A_4_LANES is the only
48724875
* supported configuration
48734876
*/

drivers/gpu/drm/i915/display/intel_fbdev.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,10 @@ int intel_fbdev_driver_fbdev_probe(struct drm_fb_helper *helper,
253253
ifbdev->fb = NULL;
254254

255255
if (fb &&
256-
(sizes->fb_width > fb->base.width ||
257-
sizes->fb_height > fb->base.height)) {
256+
(sizes->fb_width != fb->base.width ||
257+
sizes->fb_height != fb->base.height)) {
258258
drm_dbg_kms(display->drm,
259-
"BIOS fb too small (%dx%d), we require (%dx%d),"
259+
"BIOS fb not valid (%dx%d), we require (%dx%d),"
260260
" releasing it\n",
261261
fb->base.width, fb->base.height,
262262
sizes->fb_width, sizes->fb_height);

drivers/gpu/drm/i915/display/intel_quirks.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ static void quirk_increase_ddi_disabled_time(struct intel_display *display)
6666
drm_info(display->drm, "Applying Increase DDI Disabled quirk\n");
6767
}
6868

69+
/*
70+
* In some cases, the firmware might not set the lane count to 4 (for example,
71+
* when booting in some dual GPU Macs with the dGPU as the default GPU), this
72+
* quirk is used to force it as otherwise it might not be possible to compute a
73+
* valid link configuration.
74+
*/
75+
static void quirk_ddi_a_force_4_lanes(struct intel_display *display)
76+
{
77+
intel_set_quirk(display, QUIRK_DDI_A_FORCE_4_LANES);
78+
drm_info(display->drm, "Applying DDI A Forced 4 Lanes quirk\n");
79+
}
80+
6981
static void quirk_no_pps_backlight_power_hook(struct intel_display *display)
7082
{
7183
intel_set_quirk(display, QUIRK_NO_PPS_BACKLIGHT_POWER_HOOK);
@@ -240,6 +252,10 @@ static struct intel_quirk intel_quirks[] = {
240252

241253
/* Dell XPS 13 7390 2-in-1 */
242254
{ 0x8a52, 0x1028, 0x08b0, quirk_edp_limit_rate_hbr2 },
255+
{ 0x8a12, 0x1028, 0x08b0, quirk_edp_limit_rate_hbr2 },
256+
257+
/* Apple MacBookPro15,1 */
258+
{ 0x3e9b, 0x106b, 0x0176, quirk_ddi_a_force_4_lanes },
243259
};
244260

245261
static const struct intel_dpcd_quirk intel_dpcd_quirks[] = {

drivers/gpu/drm/i915/display/intel_quirks.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ enum intel_quirk_id {
2121
QUIRK_NO_PPS_BACKLIGHT_POWER_HOOK,
2222
QUIRK_FW_SYNC_LEN,
2323
QUIRK_EDP_LIMIT_RATE_HBR2,
24+
QUIRK_DDI_A_FORCE_4_LANES,
2425
};
2526

2627
void intel_init_quirks(struct intel_display *display);

drivers/gpu/vga/vga_switcheroo.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -438,12 +438,7 @@ find_active_client(struct list_head *head)
438438
bool vga_switcheroo_client_probe_defer(struct pci_dev *pdev)
439439
{
440440
if (pci_is_display(pdev)) {
441-
/*
442-
* apple-gmux is needed on pre-retina MacBook Pro
443-
* to probe the panel if pdev is the inactive GPU.
444-
*/
445-
if (apple_gmux_present() && pdev != vga_default_device() &&
446-
!vgasr_priv.handler_flags)
441+
if (apple_gmux_present() && !vgasr_priv.handler_flags)
447442
return true;
448443
}
449444

drivers/hid/Kconfig

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ config HID_APPLE
140140
tristate "Apple {i,Power,Mac}Books"
141141
depends on LEDS_CLASS
142142
depends on NEW_LEDS
143-
default !EXPERT
143+
default !EXPERT || SPI_HID_APPLE
144144
help
145145
Support for some Apple devices which less or more break
146146
HID specification.
@@ -736,11 +736,13 @@ config LOGIWHEELS_FF
736736

737737
config HID_MAGICMOUSE
738738
tristate "Apple Magic Mouse/Trackpad multi-touch support"
739+
default SPI_HID_APPLE
739740
help
740741
Support for the Apple Magic Mouse/Trackpad multi-touch.
741742

742743
Say Y here if you want support for the multi-touch features of the
743-
Apple Wireless "Magic" Mouse and the Apple Wireless "Magic" Trackpad.
744+
Apple Wireless "Magic" Mouse, the Apple Wireless "Magic" Trackpad and
745+
force touch Trackpads in Macbooks starting from 2015.
744746

745747
config HID_MALTRON
746748
tristate "Maltron L90 keyboard"
@@ -1455,4 +1457,8 @@ endif # HID
14551457

14561458
source "drivers/hid/usbhid/Kconfig"
14571459

1460+
source "drivers/hid/spi-hid/Kconfig"
1461+
1462+
source "drivers/hid/dockchannel-hid/Kconfig"
1463+
14581464
endif # HID_SUPPORT

drivers/hid/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,7 @@ obj-$(CONFIG_AMD_SFH_HID) += amd-sfh-hid/
178178
obj-$(CONFIG_SURFACE_HID_CORE) += surface-hid/
179179

180180
obj-$(CONFIG_INTEL_THC_HID) += intel-thc-hid/
181+
182+
obj-$(CONFIG_SPI_HID_APPLE_CORE) += spi-hid/
183+
184+
obj-$(CONFIG_HID_DOCKCHANNEL) += dockchannel-hid/
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR MIT
2+
menu "DockChannel HID support"
3+
depends on APPLE_DOCKCHANNEL
4+
5+
config HID_DOCKCHANNEL
6+
tristate "HID over DockChannel transport layer for Apple Silicon SoCs"
7+
default ARCH_APPLE
8+
depends on APPLE_DOCKCHANNEL && INPUT && OF && HID
9+
help
10+
Say Y here if you use an M2 or later Apple Silicon based laptop.
11+
The keyboard and touchpad are HID based devices connected via the
12+
proprietary DockChannel interface.
13+
14+
endmenu
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR MIT
2+
#
3+
# Makefile for DockChannel HID transport drivers
4+
#
5+
6+
obj-$(CONFIG_HID_DOCKCHANNEL) += dockchannel-hid.o

0 commit comments

Comments
 (0)