Skip to content

Commit 961b863

Browse files
committed
Merge branch '7.0/t2' into 7.0/base
Signed-off-by: Eric Naim <dnaim@cachyos.org>
2 parents ef184b3 + bdf31aa commit 961b863

Some content is hidden

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

61 files changed

+11832
-54
lines changed

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

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

2406+
if (vga_switcheroo_client_probe_defer(pdev))
2407+
return -EPROBE_DEFER;
2408+
24062409
if ((pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA ||
24072410
(pdev->class >> 8) == PCI_CLASS_DISPLAY_OTHER) {
24082411
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
@@ -4938,6 +4938,9 @@ static bool intel_ddi_a_force_4_lanes(struct intel_digital_port *dig_port)
49384938
if (dig_port->ddi_a_4_lanes)
49394939
return false;
49404940

4941+
if (intel_has_quirk(display, QUIRK_DDI_A_FORCE_4_LANES))
4942+
return true;
4943+
49414944
/* Broxton/Geminilake: Bspec says that DDI_A_4_LANES is the only
49424945
* supported configuration
49434946
*/

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

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

280280
if (fb &&
281-
(sizes->fb_width > fb->base.width ||
282-
sizes->fb_height > fb->base.height)) {
281+
(sizes->fb_width != fb->base.width ||
282+
sizes->fb_height != fb->base.height)) {
283283
drm_dbg_kms(display->drm,
284-
"BIOS fb too small (%dx%d), we require (%dx%d),"
284+
"BIOS fb not valid (%dx%d), we require (%dx%d),"
285285
" releasing it\n",
286286
fb->base.width, fb->base.height,
287287
sizes->fb_width, sizes->fb_height);

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

Lines changed: 15 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,9 @@ 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+
256+
/* Apple MacBookPro15,1 */
257+
{ 0x3e9b, 0x106b, 0x0176, quirk_ddi_a_force_4_lanes },
243258
};
244259

245260
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: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#define pr_fmt(fmt) "vga_switcheroo: " fmt
3232

3333
#include <linux/apple-gmux.h>
34+
#include <linux/cachy-t2.h>
3435
#include <linux/console.h>
3536
#include <linux/debugfs.h>
3637
#include <linux/fb.h>
@@ -438,12 +439,8 @@ find_active_client(struct list_head *head)
438439
bool vga_switcheroo_client_probe_defer(struct pci_dev *pdev)
439440
{
440441
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)
442+
if (apple_gmux_present() && !vgasr_priv.handler_flags &&
443+
(pdev != vga_default_device() || dmi_check_system(t2_mac_tbl)))
447444
return true;
448445
}
449446

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.
@@ -728,11 +728,13 @@ config LOGIWHEELS_FF
728728

729729
config HID_MAGICMOUSE
730730
tristate "Apple Magic Mouse/Trackpad multi-touch support"
731+
default SPI_HID_APPLE
731732
help
732733
Support for the Apple Magic Mouse/Trackpad multi-touch.
733734

734735
Say Y here if you want support for the multi-touch features of the
735-
Apple Wireless "Magic" Mouse and the Apple Wireless "Magic" Trackpad.
736+
Apple Wireless "Magic" Mouse, the Apple Wireless "Magic" Trackpad and
737+
force touch Trackpads in Macbooks starting from 2015.
736738

737739
config HID_MALTRON
738740
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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ obj-$(CONFIG_INTEL_ISH_HID) += intel-ish-hid/
174174

175175
obj-$(CONFIG_AMD_SFH_HID) += amd-sfh-hid/
176176

177+
obj-$(CONFIG_HID_DOCKCHANNEL) += dockchannel-hid/
178+
179+
obj-$(CONFIG_SPI_HID_APPLE_CORE) += spi-hid/
180+
181+
obj-$(CONFIG_HID_DOCKCHANNEL) += dockchannel-hid/
182+
177183
obj-$(CONFIG_SURFACE_HID_CORE) += surface-hid/
178184

179185
obj-$(CONFIG_INTEL_THC_HID) += intel-thc-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)