You've already forked linux-t2-patches
mirror of
https://github.com/t2linux/linux-t2-patches.git
synced 2026-04-30 13:52:11 -07:00
Change to patch versions being sent to upstream
Also remove provides apple-bce, as it was causing conflicts.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
From b6740001d1adbfe84768b859bee038ceeccdc50c Mon Sep 17 00:00:00 2001
|
||||
From: "Ard Biesheuvel" <ardb@kernel.org>
|
||||
Subject: [PATCH] efi: runtime: avoid EFIv2 runtime services on Apple x86 machines
|
||||
Date: Wed, 12 Jan 2022 21:14:13 +1100
|
||||
|
||||
Aditya reports [0] that his recent MacbookPro crashes in the firmware
|
||||
when using the variable services at runtime. The culprit appears to be a
|
||||
call to QueryVariableInfo(), which we did not use to call on Apple x86
|
||||
machines in the past as they only upgraded from EFI v1.10 to EFI v2.40
|
||||
firmware fairly recently, and QueryVariableInfo() (along with
|
||||
UpdateCapsule() et al) was added in EFI v2.00.
|
||||
|
||||
The only runtime service introduced in EFI v2.00 that we actually use in
|
||||
Linux is QueryVariableInfo(), as the capsule based ones are optional,
|
||||
generally not used at runtime (all the LVFS/fwupd firmware update
|
||||
infrastructure uses helper EFI programs that invoke capsule update at
|
||||
boot time, not runtime), and not implemented by Apple machines in the
|
||||
first place. QueryVariableInfo() is used to 'safely' set variables,
|
||||
i.e., only when there is enough space. This prevents machines with buggy
|
||||
firmwares from corrupting their NVRAMs when they run out of space.
|
||||
|
||||
Given that Apple machines have been using EFI v1.10 services only for
|
||||
the longest time (the EFI v2.0 spec was released in 2006, and Linux
|
||||
support for the newly introduced runtime services was added in 2011, but
|
||||
the MacbookPro12,1 released in 2015 still claims to be EFI v1.10 only),
|
||||
let's avoid the EFI v2.0 ones on all Apple x86 machines.
|
||||
|
||||
[0] https://lore.kernel.org/all/6D757C75-65B1-468B-842D-10410081A8E4@live.com/
|
||||
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Cc: Jeremy Kerr <jk@ozlabs.org>
|
||||
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
|
||||
Reported-by: Aditya Garg <gargaditya08@live.com>
|
||||
Tested-by: Orlando Chamberlain <redecorating@protonmail.com>
|
||||
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
---
|
||||
drivers/firmware/efi/efi.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
|
||||
index ae79c3300129..7de3f5b6e8d0 100644
|
||||
--- a/drivers/firmware/efi/efi.c
|
||||
+++ b/drivers/firmware/efi/efi.c
|
||||
@@ -722,6 +722,13 @@ void __init efi_systab_report_header(const efi_table_hdr_t *systab_hdr,
|
||||
systab_hdr->revision >> 16,
|
||||
systab_hdr->revision & 0xffff,
|
||||
vendor);
|
||||
+
|
||||
+ if (IS_ENABLED(CONFIG_X86_64) &&
|
||||
+ systab_hdr->revision > EFI_1_10_SYSTEM_TABLE_REVISION &&
|
||||
+ !strcmp(vendor, "Apple")) {
|
||||
+ pr_info("Apple Mac detected, using EFI v1.10 runtime services only\n");
|
||||
+ efi.runtime_version = EFI_1_10_SYSTEM_TABLE_REVISION;
|
||||
+ }
|
||||
}
|
||||
|
||||
static __initdata char memory_type_name[][13] = {
|
||||
--
|
||||
2.30.2
|
||||
@@ -1,30 +0,0 @@
|
||||
From d517938989ffb7e85434a2da442bef61d89bf706 Mon Sep 17 00:00:00 2001
|
||||
From: Orlando Chamberlain <redecorating@protonmail.com>
|
||||
Date: Tue, 11 Jan 2022 16:20:33 +1100
|
||||
Subject: [PATCH 1/1] x86: efi: force runtime v1.10 fix T2 nvram writes
|
||||
|
||||
EFI v1.10 doesn't have EFI_QUERY_VARIABLE_INFO, so linux won't use it.
|
||||
This means T2 Macs will be able to write to nvram.
|
||||
|
||||
Link: https://lore.kernel.org/all/20220111051717.25b86946@localhost/T/#mde6cc47d38ff5c9ad561eaf932bbd20e6e8eeca8
|
||||
|
||||
---
|
||||
arch/x86/platform/efi/efi.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
|
||||
index 147c30a81f15..d7203355cc69 100644
|
||||
--- a/arch/x86/platform/efi/efi.c
|
||||
+++ b/arch/x86/platform/efi/efi.c
|
||||
@@ -399,7 +399,7 @@ static int __init efi_systab_init(unsigned long phys)
|
||||
efi_nr_tables = systab32->nr_tables;
|
||||
}
|
||||
|
||||
- efi.runtime_version = hdr->revision;
|
||||
+ efi.runtime_version = EFI_1_10_SYSTEM_TABLE_REVISION;
|
||||
|
||||
efi_systab_report_header(hdr, efi_fw_vendor);
|
||||
early_memunmap(p, size);
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
From b6740001d1adbfe84768b859bee038ceeccdc50c Mon Sep 17 00:00:00 2001
|
||||
From: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Date: Wed, 29 Jul 2020 08:04:54 -0500
|
||||
Subject: [PATCH] drm/amd/display: Force link_rate as LINK_RATE_RBR2 for 2018
|
||||
15" Apple Retina panels
|
||||
Date: Wed, 12 Jan 2022 22:38:15 +1100
|
||||
Subject: [PATCH] drm/amd/display: Force link_rate as LINK_RATE_RBR2 for 2018 15" Apple Retina panels
|
||||
|
||||
The eDP link rate reported by the DP_MAX_LINK_RATE dpcd register (0xa) is
|
||||
contradictory to the highest rate supported reported by
|
||||
@@ -21,18 +20,19 @@ firmware version.
|
||||
|
||||
Tested-by: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Signed-off-by: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Signed-off-by: Aditya Garg <gargaditya08@live.com>
|
||||
---
|
||||
.../gpu/drm/amd/display/dc/core/dc_link_dp.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
|
||||
index fbcd979438e2..8f78f9928df6 100644
|
||||
index 05e216524..17939ad17 100644
|
||||
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
|
||||
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
|
||||
@@ -3465,6 +3465,25 @@ static bool retrieve_link_cap(struct dc_link *link)
|
||||
@@ -5597,6 +5597,25 @@ static bool retrieve_link_cap(struct dc_link *link)
|
||||
dp_hw_fw_revision.ieee_fw_rev,
|
||||
sizeof(dp_hw_fw_revision.ieee_fw_rev));
|
||||
|
||||
|
||||
+ /* Quirk for Apple MBP 2018 15" Retina panels: wrong DP_MAX_LINK_RATE */
|
||||
+ {
|
||||
+ uint8_t str_mbp_2018[] = { 101, 68, 21, 103, 98, 97 };
|
||||
@@ -55,6 +55,5 @@ index fbcd979438e2..8f78f9928df6 100644
|
||||
memset(&link->dpcd_caps.dsc_caps, '\0',
|
||||
sizeof(link->dpcd_caps.dsc_caps));
|
||||
memset(&link->dpcd_caps.fec_cap, '\0', sizeof(link->dpcd_caps.fec_cap));
|
||||
--
|
||||
2.28.0
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,27 +1,28 @@
|
||||
From 4b7d515dcd6b4faf84a05b8ef555d75875314407 Mon Sep 17 00:00:00 2001
|
||||
From b6740001d1adbfe84768b859bee038ceeccdc50c Mon Sep 17 00:00:00 2001
|
||||
From: Paul Pawlowski <paul@mrarm.io>
|
||||
Date: Tue, 18 Aug 2020 06:55:07 -0500
|
||||
Subject: [PATCH] media: uvcvideo: Add support for Apple T2-attached iSight
|
||||
Camera
|
||||
Date: Thu, 13 Jan 2022 00:13:01 +1100
|
||||
Subject: [PATCH] media: uvcvideo: Add support for Apple T2-attached FaceTime HD Camera
|
||||
|
||||
Adds the requisite device id to support detection of the Apple iSight
|
||||
webcam exposed over the T2 BCE VHCI interface.
|
||||
Adds the requisite device id to support detection of the Apple FaceTime
|
||||
HD webcam exposed over the T2 BCE VHCI interface.
|
||||
|
||||
Tested-by: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Signed-off-by: Paul Pawlowski <paul@mrarm.io>
|
||||
Signed-off-by: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Signed-off-by: Aditya Garg <gargaditya08@live.com>
|
||||
---
|
||||
drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
|
||||
index 431d86e1c94b..1183b6372a14 100644
|
||||
index 7c007426e..88dc9e7aa 100644
|
||||
--- a/drivers/media/usb/uvc/uvc_driver.c
|
||||
+++ b/drivers/media/usb/uvc/uvc_driver.c
|
||||
@@ -2908,6 +2908,15 @@ static const struct usb_device_id uvc_ids[] = {
|
||||
.bInterfaceSubClass = 1,
|
||||
@@ -2848,6 +2848,15 @@ static const struct usb_device_id uvc_ids[] = {
|
||||
.bInterfaceProtocol = 0,
|
||||
.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
|
||||
+ /* Apple Built-In iSight via iBridge */
|
||||
.driver_info = UVC_INFO_QUIRK(UVC_QUIRK_PROBE_MINMAX
|
||||
| UVC_QUIRK_BUILTIN_ISIGHT) },
|
||||
+ /* Apple FaceTime HD Camera (Built-In) */
|
||||
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
|
||||
+ | USB_DEVICE_ID_MATCH_INT_INFO,
|
||||
+ .idVendor = 0x05ac,
|
||||
@@ -30,9 +31,8 @@ index 431d86e1c94b..1183b6372a14 100644
|
||||
+ .bInterfaceSubClass = 1,
|
||||
+ .bInterfaceProtocol = 0,
|
||||
+ .driver_info = (kernel_ulong_t)&uvc_quirk_probe_def },
|
||||
/* Generic USB Video Class */
|
||||
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
|
||||
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },
|
||||
--
|
||||
2.28.0
|
||||
|
||||
/* Apple Built-In iSight via iBridge */
|
||||
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE
|
||||
| USB_DEVICE_ID_MATCH_INT_INFO,
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -1,40 +1,32 @@
|
||||
From 155bb242ee7f4e177386fbdec565db6d4a173d5e Mon Sep 17 00:00:00 2001
|
||||
From: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Date: Wed, 16 Sep 2020 18:31:10 -0500
|
||||
Subject: [PATCH] drm/i915/fbdev: Discard BIOS framebuffers exceeding hardware
|
||||
supported size
|
||||
From: Ashish Arora <ashisharora.linux@outlook.com>
|
||||
Subject: Re: [PATCH] drm/i915: Discard large BIOS framebuffers causing display corruption.
|
||||
Date: Sat, 08 Jan 2022 21:43:18 +1100
|
||||
|
||||
On certain devices with high-DPI panels, the BIOS supplied framebuffer is larger
|
||||
than what is physically supported by the panel, resulting in overscan. A previous
|
||||
check introduced with edd586fe ("drm/i915: Discard BIOS framebuffers too small to
|
||||
accommodate chosen mode"), handles the lower bound case. We extend that check
|
||||
to include the upper bound case.
|
||||
On certain 4k panels, the BIOS framebuffer is larger than what panel
|
||||
requires causing display corruption. Introduce a check for the same.
|
||||
|
||||
Signed-off-by: Aun-Ali Zaidi <admin@kodeit.net>
|
||||
Signed-off-by: Ashish Arora <ashisharora.linux@outlook.com>
|
||||
---
|
||||
drivers/gpu/drm/i915/display/intel_fbdev.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
drivers/gpu/drm/i915/display/intel_fbdev.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
|
||||
index bd39eb6a21b8..1949526cbe20 100644
|
||||
index adc3a81be..0a64184df 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
|
||||
@@ -181,10 +181,12 @@ static int intelfb_create(struct drm_fb_helper *helper,
|
||||
@@ -194,10 +194,10 @@ static int intelfb_create(struct drm_fb_helper *helper,
|
||||
int ret;
|
||||
|
||||
if (intel_fb &&
|
||||
- (sizes->fb_width > intel_fb->base.width ||
|
||||
- sizes->fb_height > intel_fb->base.height)) {
|
||||
+ ((sizes->fb_width > intel_fb->base.width ||
|
||||
+ sizes->fb_height > intel_fb->base.height) ||
|
||||
+ (sizes->fb_width < intel_fb->base.width ||
|
||||
+ sizes->fb_height < intel_fb->base.height))) {
|
||||
+ (sizes->fb_width != intel_fb->base.width ||
|
||||
+ sizes->fb_height != intel_fb->base.height)) {
|
||||
drm_dbg_kms(&dev_priv->drm,
|
||||
- "BIOS fb too small (%dx%d), we require (%dx%d),"
|
||||
+ "BIOS fb invalid size (%dx%d), we require (%dx%d),"
|
||||
+ "BIOS fb not valid (%dx%d), we require (%dx%d),"
|
||||
" releasing it\n",
|
||||
intel_fb->base.width, intel_fb->base.height,
|
||||
sizes->fb_width, sizes->fb_height);
|
||||
--
|
||||
2.28.0
|
||||
|
||||
2.25.1
|
||||
|
||||
@@ -12,10 +12,7 @@ _srctag=v${pkgver%.*}-${pkgver##*.}
|
||||
url="https://git.archlinux.org/linux.git/log/?h=v$_srctag"
|
||||
arch=(x86_64)
|
||||
license=(GPL2)
|
||||
provides=(
|
||||
apple-bce
|
||||
apple-ibridge
|
||||
)
|
||||
provides=()
|
||||
makedepends=(
|
||||
bc kmod libelf pahole cpio perl tar xz
|
||||
xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick
|
||||
@@ -33,7 +30,7 @@ source=(
|
||||
0002-HID-quirks-Add-Apple-Magic-Trackpad-2-to-hid_have_sp.patch
|
||||
|
||||
# Nvram Write without panic
|
||||
0101-x86-efi-force-runtime-v1.10-fix-T2-nvram-writes.patch
|
||||
0101-efi-runtime-avoid-EFIv2-runtime-services-on-Apple-x8.patch
|
||||
|
||||
# apple-bce, apple-ibridge
|
||||
apple-bce::git+https://github.com/t2linux/apple-bce-drv#commit=f93c6566f98b3c95677de8010f7445fa19f75091
|
||||
@@ -301,12 +298,12 @@ sha256sums=('027d7e8988bb69ac12ee92406c3be1fe13f990b1ca2249e226225cd1573308bb'
|
||||
'7cbba374356a189faac71001c5344ce8f02434684b1ce1accefc0cc4bd6718e5'
|
||||
'6b4da532421cac5600d09c0c52742aa52d848af098f7853abe60c02e9d0a3752'
|
||||
'2184069ab00ef43d9674756e9b7a56d15188bc4494d34425f04ddc779c52acd8'
|
||||
'dfaa7a8ba9244ca8947d7caf312daa96b272edcc989421c8b33d5c3f706333de'
|
||||
'f34b14ea53d216cc5cfe63c2a97b6922845c7f40ea6b05145504711c382ec6ee'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'b7c987889d92a48d638d5258842b10f6c856e57f29ad23475aa507c7b4ad5710'
|
||||
'0e371fe1efd1ec422f89439a2befb5a0c3dd28c9e60780f55493d9699c6ebc0e'
|
||||
'786dfc22e4c6ece883e7dedd0ba3f6c14018584df95450b2cb78f3da8b01f7cb'
|
||||
'114ed15a4769aa4c7f9bdf2e4f892119c7f033462f0fe1a7cfd544f110e3d034'
|
||||
'cfd23a06797ac86575044428a393dd7f10f06eff7648d0b78aedad82cbe41279'
|
||||
'8d8401a99a9dfbc41aa2dc5b6a409a19860b1b918465e19de4a4ff18de075ea3'
|
||||
'08d165106fe35b68a7b48f216566951a5db0baac19098c015bcc81c5fcba678d'
|
||||
@@ -324,8 +321,8 @@ sha256sums=('027d7e8988bb69ac12ee92406c3be1fe13f990b1ca2249e226225cd1573308bb'
|
||||
'cac035fe07663a319185c644c5b39b34bef89ada348881fa4a02d15290260445'
|
||||
'9dfa9f02d17c5cd9620fa2c1d43ca967b81b6a56d33c2bafae14e0c64e498baa'
|
||||
'2cfc28a394117184c4fd4c14fd8d1cbf2ed6d2c5ddba93f077cbbc621d73ca81'
|
||||
'9640178d6251686c980c30fc528b3d70beac6ce8246bf433506a3f843808326c'
|
||||
'90a6012cdd8a64ede8e0bbaf7331960bd68f628e0973b65459188eb1ccb5b829'
|
||||
'31e65ffa0ec2a998de6a806f931a9ca684a9be5933918a94b0e79ef6456e0821'
|
||||
'9ede98eceb69e9c93e25fdb2c567466963bdd2f81c0ecb9fb9e5107f6142ff26'
|
||||
'862f631ef9f25453ce38d9ed0197e62d85f9f5a0625ed77237e643297fb42f75'
|
||||
'2f7899b70d5c55aea3f6385385fea01ce21b48f9441982a94f36c842cceec083'
|
||||
'2b126cda3863f49b8d3a6de8fa8cca979d87bd9e66812531be5c02c9e5840d82'
|
||||
|
||||
Reference in New Issue
Block a user