public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add support for eGPUs on Apple Products
@ 2026-01-28 14:58 Atharva Tiwari
  2026-01-28 14:58 ` [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices Atharva Tiwari
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Atharva Tiwari @ 2026-01-28 14:58 UTC (permalink / raw)
  Cc: Atharva Tiwari, Ard Biesheuvel, Jani Nikula, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, David Airlie, Simona Vetter,
	Javier Martinez Canillas, Thomas Zimmermann, Lenny Szubowicz,
	Ingo Molnar, Francesco Pompo, linux-efi, linux-kernel, intel-gfx,
	intel-xe, dri-devel

This series adds support for eGPUs on Apple products, by
enabling apple-set-os on all apple devices.

A side effect of this patch is that the iGPU becomes enabled on iMacs.
However, iMacs can’t use the iGPU to drive the display
(They can't link-train the internal display),
so displays must be disabled on iMacs.

Changes in v2:
- Reworded cover-letter
- Transferred logic to has_no_display in the 2nd patch

Link to v1:
https://lore.kernel.org/all/20260125001111.1269-1-atharvatiwarilinuxdev@gmail.com/

Atharva Tiwari (2):
  efi/libstub: enable apple-set-os for all apple devices
  drm/i915/display: Disable display for iMac's

 drivers/firmware/efi/libstub/x86-stub.c       | 22 +++++--------------
 .../drm/i915/display/intel_display_device.c   | 13 ++++++++++-
 2 files changed, 17 insertions(+), 18 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices
  2026-01-28 14:58 [PATCH v2 0/2] Add support for eGPUs on Apple Products Atharva Tiwari
@ 2026-01-28 14:58 ` Atharva Tiwari
  2026-01-28 15:45   ` Lukas Wunner
  2026-01-28 14:58 ` [PATCH v2 2/2] drm/i915/display: Disable display for iMac's Atharva Tiwari
  2026-01-28 15:56 ` [PATCH v2 0/2] Add support for eGPUs on Apple Products Lukas Wunner
  2 siblings, 1 reply; 14+ messages in thread
From: Atharva Tiwari @ 2026-01-28 14:58 UTC (permalink / raw)
  Cc: Atharva Tiwari, Ard Biesheuvel, Jani Nikula, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, David Airlie, Simona Vetter,
	Javier Martinez Canillas, Thomas Zimmermann,
	Borislav Petkov (AMD), Francesco Pompo, Lenny Szubowicz,
	linux-efi, linux-kernel, intel-gfx, intel-xe, dri-devel

Make apple-set-os run on all macs, as
apple-set-os is needed to use eGPUs and iGPU.

(tested on iMac20,1)

Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>
---
 drivers/firmware/efi/libstub/x86-stub.c | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index cef32e2c82d8..60e1a41bfe5f 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -303,32 +303,20 @@ static const struct efi_smbios_record *get_table_record(u8 type)
 
 static bool apple_match_product_name(void)
 {
-	static const char type1_product_matches[][15] = {
-		"MacBookPro11,3",
-		"MacBookPro11,5",
-		"MacBookPro13,3",
-		"MacBookPro14,3",
-		"MacBookPro15,1",
-		"MacBookPro15,3",
-		"MacBookPro16,1",
-		"MacBookPro16,4",
-	};
 	const struct efi_smbios_type1_record *record;
-	const u8 *product;
+	const u8 *vendor;
 
 	record = (struct efi_smbios_type1_record *)
 			(efi_get_smbios_record(1) ?: get_table_record(1));
 	if (!record)
 		return false;
 
-	product = efi_get_smbios_string(record, product_name);
-	if (!product)
+	vendor = efi_get_smbios_string(record, manufacturer);
+	if (!vendor)
 		return false;
 
-	for (int i = 0; i < ARRAY_SIZE(type1_product_matches); i++) {
-		if (!strcmp(product, type1_product_matches[i]))
-			return true;
-	}
+	if (!strcmp(vendor, "Apple Inc."))
+		return true;
 
 	return false;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 2/2] drm/i915/display: Disable display for iMac's
  2026-01-28 14:58 [PATCH v2 0/2] Add support for eGPUs on Apple Products Atharva Tiwari
  2026-01-28 14:58 ` [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices Atharva Tiwari
@ 2026-01-28 14:58 ` Atharva Tiwari
  2026-01-28 15:23   ` Jani Nikula
  2026-01-28 15:49   ` Lukas Wunner
  2026-01-28 15:56 ` [PATCH v2 0/2] Add support for eGPUs on Apple Products Lukas Wunner
  2 siblings, 2 replies; 14+ messages in thread
From: Atharva Tiwari @ 2026-01-28 14:58 UTC (permalink / raw)
  Cc: Atharva Tiwari, Ard Biesheuvel, Jani Nikula, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, David Airlie, Simona Vetter,
	Thomas Zimmermann, Javier Martinez Canillas,
	Borislav Petkov (AMD), Lenny Szubowicz, Francesco Pompo,
	linux-efi, linux-kernel, intel-gfx, intel-xe, dri-devel

Disable display on iMacs, as they can't do link training
on the internal display.

(tested on iMac20,1)

Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>
---
 .../gpu/drm/i915/display/intel_display_device.c    | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
index 1170afaa8680..b1fec1018d7e 100644
--- a/drivers/gpu/drm/i915/display/intel_display_device.c
+++ b/drivers/gpu/drm/i915/display/intel_display_device.c
@@ -3,6 +3,7 @@
  * Copyright © 2023 Intel Corporation
  */
 
+#include <linux/dmi.h>
 #include <linux/pci.h>
 
 #include <drm/drm_color_mgmt.h>
@@ -1435,7 +1436,18 @@ static bool has_no_display(struct pci_dev *pdev)
 		{}
 	};
 
-	return pci_match_id(ids, pdev);
+	static const struct dmi_system_id dmi_ids[] = {
+		{
+			.ident = "Apple Inc. iMac",
+			.matches = {
+				DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
+				DMI_MATCH(DMI_PRODUCT_NAME, "iMac"),
+			}
+		},
+		{}
+	};
+
+	return pci_match_id(ids, pdev) || dmi_check_system(dmi_ids);
 }
 
 #define INTEL_DISPLAY_DEVICE(_id, _desc) { .devid = (_id), .desc = (_desc) }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 2/2] drm/i915/display: Disable display for iMac's
  2026-01-28 14:58 ` [PATCH v2 2/2] drm/i915/display: Disable display for iMac's Atharva Tiwari
@ 2026-01-28 15:23   ` Jani Nikula
  2026-01-28 15:37     ` Ville Syrjälä
  2026-01-28 15:49   ` Lukas Wunner
  1 sibling, 1 reply; 14+ messages in thread
From: Jani Nikula @ 2026-01-28 15:23 UTC (permalink / raw)
  To: Atharva Tiwari
  Cc: Atharva Tiwari, Ard Biesheuvel, Rodrigo Vivi, Joonas Lahtinen,
	Tvrtko Ursulin, David Airlie, Simona Vetter, Thomas Zimmermann,
	Javier Martinez Canillas, Borislav Petkov (AMD), Lenny Szubowicz,
	Francesco Pompo, linux-efi, linux-kernel, intel-gfx, intel-xe,
	dri-devel

On Wed, 28 Jan 2026, Atharva Tiwari <atharvatiwarilinuxdev@gmail.com> wrote:
> Disable display on iMacs, as they can't do link training
> on the internal display.

I'd expand on that a bit, based on the previous discussion.

>
> (tested on iMac20,1)
>
> Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>

I can't test this, but if nobody chimes in to oppose, I'll take it.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>


> ---
>  .../gpu/drm/i915/display/intel_display_device.c    | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
> index 1170afaa8680..b1fec1018d7e 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.c
> @@ -3,6 +3,7 @@
>   * Copyright © 2023 Intel Corporation
>   */
>  
> +#include <linux/dmi.h>
>  #include <linux/pci.h>
>  
>  #include <drm/drm_color_mgmt.h>
> @@ -1435,7 +1436,18 @@ static bool has_no_display(struct pci_dev *pdev)
>  		{}
>  	};
>  
> -	return pci_match_id(ids, pdev);
> +	static const struct dmi_system_id dmi_ids[] = {
> +		{
> +			.ident = "Apple Inc. iMac",
> +			.matches = {
> +				DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
> +				DMI_MATCH(DMI_PRODUCT_NAME, "iMac"),
> +			}
> +		},
> +		{}
> +	};
> +
> +	return pci_match_id(ids, pdev) || dmi_check_system(dmi_ids);
>  }
>  
>  #define INTEL_DISPLAY_DEVICE(_id, _desc) { .devid = (_id), .desc = (_desc) }

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 2/2] drm/i915/display: Disable display for iMac's
  2026-01-28 15:23   ` Jani Nikula
@ 2026-01-28 15:37     ` Ville Syrjälä
  2026-01-28 16:03       ` Lukas Wunner
  0 siblings, 1 reply; 14+ messages in thread
From: Ville Syrjälä @ 2026-01-28 15:37 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Atharva Tiwari, Ard Biesheuvel, Rodrigo Vivi, Joonas Lahtinen,
	Tvrtko Ursulin, David Airlie, Simona Vetter, Thomas Zimmermann,
	Javier Martinez Canillas, Borislav Petkov (AMD), Lenny Szubowicz,
	Francesco Pompo, linux-efi, linux-kernel, intel-gfx, intel-xe,
	dri-devel

On Wed, Jan 28, 2026 at 05:23:51PM +0200, Jani Nikula wrote:
> On Wed, 28 Jan 2026, Atharva Tiwari <atharvatiwarilinuxdev@gmail.com> wrote:
> > Disable display on iMacs, as they can't do link training
> > on the internal display.
> 
> I'd expand on that a bit, based on the previous discussion.
> 
> >
> > (tested on iMac20,1)
> >
> > Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>
> 
> I can't test this, but if nobody chimes in to oppose, I'll take it.

I guess the main problem with a hack like this is that you won't
be able to get deep pkgC states due to the display hardware not
going into DC5/6.

But I can't immediately think of other issues due this being an
iGPU, so eg. runtime PCI D3 doesn't really do anything meaningful
and thus the display hardware remaining powered on shouldn't
matter that much (apart from the increased power usage).

> 
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> 
> 
> > ---
> >  .../gpu/drm/i915/display/intel_display_device.c    | 14 +++++++++++++-
> >  1 file changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c
> > index 1170afaa8680..b1fec1018d7e 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_device.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_device.c
> > @@ -3,6 +3,7 @@
> >   * Copyright © 2023 Intel Corporation
> >   */
> >  
> > +#include <linux/dmi.h>
> >  #include <linux/pci.h>
> >  
> >  #include <drm/drm_color_mgmt.h>
> > @@ -1435,7 +1436,18 @@ static bool has_no_display(struct pci_dev *pdev)
> >  		{}
> >  	};
> >  
> > -	return pci_match_id(ids, pdev);
> > +	static const struct dmi_system_id dmi_ids[] = {
> > +		{
> > +			.ident = "Apple Inc. iMac",
> > +			.matches = {
> > +				DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
> > +				DMI_MATCH(DMI_PRODUCT_NAME, "iMac"),
> > +			}
> > +		},
> > +		{}
> > +	};
> > +
> > +	return pci_match_id(ids, pdev) || dmi_check_system(dmi_ids);
> >  }
> >  
> >  #define INTEL_DISPLAY_DEVICE(_id, _desc) { .devid = (_id), .desc = (_desc) }
> 
> -- 
> Jani Nikula, Intel

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices
  2026-01-28 14:58 ` [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices Atharva Tiwari
@ 2026-01-28 15:45   ` Lukas Wunner
  2026-01-29  4:37     ` Atharva Tiwari
  2026-02-02  8:01     ` Atharva Tiwari
  0 siblings, 2 replies; 14+ messages in thread
From: Lukas Wunner @ 2026-01-28 15:45 UTC (permalink / raw)
  To: Atharva Tiwari
  Cc: Ard Biesheuvel, Jani Nikula, Rodrigo Vivi, Joonas Lahtinen,
	Tvrtko Ursulin, David Airlie, Simona Vetter,
	Javier Martinez Canillas, Thomas Zimmermann,
	Borislav Petkov (AMD), Francesco Pompo, Lenny Szubowicz,
	linux-efi, linux-kernel, intel-gfx, intel-xe, dri-devel

On Wed, Jan 28, 2026 at 02:58:37PM +0000, Atharva Tiwari wrote:
> Make apple-set-os run on all macs, as
> apple-set-os is needed to use eGPUs and iGPU.

As discussed previously, your patch will regress older MacBook Airs
which use SPI to access keyboard + trackpad if the set_os protocol
is invoked:

https://lore.kernel.org/all/ZoJPgSlZJ3ZlU2zL@wunner.de/

The last time this topic came up, I suggested counting the number of
GPUs instead of using the DMI quirk.  I even provided a patch but
nobody with an eGPU bothered to test it, so the thread fizzled out:

https://lore.kernel.org/all/Z6paeFrjdv7L3mtv@wunner.de/

Maybe you could give it a spin and verify if it fixes the issue for you?

Thanks,

Lukas

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 2/2] drm/i915/display: Disable display for iMac's
  2026-01-28 14:58 ` [PATCH v2 2/2] drm/i915/display: Disable display for iMac's Atharva Tiwari
  2026-01-28 15:23   ` Jani Nikula
@ 2026-01-28 15:49   ` Lukas Wunner
  1 sibling, 0 replies; 14+ messages in thread
From: Lukas Wunner @ 2026-01-28 15:49 UTC (permalink / raw)
  To: Atharva Tiwari
  Cc: Ard Biesheuvel, Jani Nikula, Rodrigo Vivi, Joonas Lahtinen,
	Tvrtko Ursulin, David Airlie, Simona Vetter, Thomas Zimmermann,
	Javier Martinez Canillas, Borislav Petkov (AMD), Lenny Szubowicz,
	Francesco Pompo, linux-efi, linux-kernel, intel-gfx, intel-xe,
	dri-devel

On Wed, Jan 28, 2026 at 02:58:38PM +0000, Atharva Tiwari wrote:
> Disable display on iMacs, as they can't do link training
> on the internal display.
> 
> (tested on iMac20,1)

So with your patch the screen is black on those iMacs?
I don't quite understand why that would be desirable.

What happens without this patch?  Something worse than a black screen?
This needs to be explained in the commit message so that reviewers
understand why the patch is needed.

I also don't understand why this patch follows the EFI set_os one.
What's the connection between those two patches?  If there is none,
they shouldn't be submitted as a series but as two individual patches.

Thanks,

Lukas

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 0/2] Add support for eGPUs on Apple Products
  2026-01-28 14:58 [PATCH v2 0/2] Add support for eGPUs on Apple Products Atharva Tiwari
  2026-01-28 14:58 ` [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices Atharva Tiwari
  2026-01-28 14:58 ` [PATCH v2 2/2] drm/i915/display: Disable display for iMac's Atharva Tiwari
@ 2026-01-28 15:56 ` Lukas Wunner
  2026-01-28 17:12   ` Atharva Tiwari
  2 siblings, 1 reply; 14+ messages in thread
From: Lukas Wunner @ 2026-01-28 15:56 UTC (permalink / raw)
  To: Atharva Tiwari
  Cc: Ard Biesheuvel, Jani Nikula, Rodrigo Vivi, Joonas Lahtinen,
	Tvrtko Ursulin, David Airlie, Simona Vetter,
	Javier Martinez Canillas, Thomas Zimmermann, Lenny Szubowicz,
	Ingo Molnar, Francesco Pompo, linux-efi, linux-kernel, intel-gfx,
	intel-xe, dri-devel

On Wed, Jan 28, 2026 at 02:58:36PM +0000, Atharva Tiwari wrote:
> This series adds support for eGPUs on Apple products, by
> enabling apple-set-os on all apple devices.
> 
> A side effect of this patch is that the iGPU becomes enabled on iMacs.
> However, iMacs can’t use the iGPU to drive the display
> (They can't link-train the internal display),
> so displays must be disabled on iMacs.

Oh there's the explanation that should have been in the commit message
of patch [2/2].

It's possible that the iMac has a multiplexer built-in which can
switch between the iGPU and dGPU at runtime.  Please ensure that
you have set CONFIG_APPLE_GMUX=y in your .config, the gmux driver
should bind to the multiplexer if there is one.

If there is a multiplexer built-in, then disabling the iGPU is the
wrong approach.

Thanks,

Lukas

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 2/2] drm/i915/display: Disable display for iMac's
  2026-01-28 15:37     ` Ville Syrjälä
@ 2026-01-28 16:03       ` Lukas Wunner
  0 siblings, 0 replies; 14+ messages in thread
From: Lukas Wunner @ 2026-01-28 16:03 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Jani Nikula, Atharva Tiwari, Ard Biesheuvel, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, David Airlie, Simona Vetter,
	Thomas Zimmermann, Javier Martinez Canillas,
	Borislav Petkov (AMD), Lenny Szubowicz, Francesco Pompo,
	linux-efi, linux-kernel, intel-gfx, intel-xe, dri-devel

On Wed, Jan 28, 2026 at 05:37:18PM +0200, Ville Syrjälä wrote:
> On Wed, Jan 28, 2026 at 05:23:51PM +0200, Jani Nikula wrote:
> > On Wed, 28 Jan 2026, Atharva Tiwari <atharvatiwarilinuxdev@gmail.com> wrote:
> > > Disable display on iMacs, as they can't do link training
> > > on the internal display.
> > >
> > > (tested on iMac20,1)
> 
> I guess the main problem with a hack like this is that you won't
> be able to get deep pkgC states due to the display hardware not
> going into DC5/6.

If patch [1/2] in this series results in a power regression,
I'd say it needs to be reworked.  Either exclude iMacs from
the set_os protocol or find a way to power down the iGPU again
once the kernel has assumed control.

I wonder what macOS does.  If the iGPU is exposed by set_os,
surely macOS must be able to power down the iGPU again,
so we should be doing the same.

Thanks,

Lukas

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 0/2] Add support for eGPUs on Apple Products
  2026-01-28 15:56 ` [PATCH v2 0/2] Add support for eGPUs on Apple Products Lukas Wunner
@ 2026-01-28 17:12   ` Atharva Tiwari
  0 siblings, 0 replies; 14+ messages in thread
From: Atharva Tiwari @ 2026-01-28 17:12 UTC (permalink / raw)
  To: lukas
  Cc: airlied, ardb, atharvatiwarilinuxdev, dri-devel, francescopompo2,
	intel-gfx, intel-xe, jani.nikula, javierm, joonas.lahtinen,
	linux-efi, linux-kernel, lszubowi, mingo, rodrigo.vivi, simona,
	tursulin, tzimmermann

> It's possible that the iMac has a multiplexer built-in which can
> switch between the iGPU and dGPU at runtime.  Please ensure that
> you have set CONFIG_APPLE_GMUX=y in your .config, the gmux driver
> should bind to the multiplexer if there is one.
> 
> If there is a multiplexer built-in, then disabling the iGPU is the
> wrong approach.

I was using apple-gmux even before this patch, and runtime GPU switching
does not work on either macOS or Linux.
On macOS, the iGPU does not even appear in System Information.
However, the iGPU is present in IORegistry, and Apple appears to use it
only for acceleration, not for display output. This can be seen from
the following IORegistry entry:

    | |   | +-o AppleIntelFramebufferController  <class AppleIntelFramebufferController, id 0x100000556, registered, matched, active, busy 0 (230 ms), retain 8>
    | |   | | |   "IOClass" = "AppleIntelFramebufferController"
    | |   | | |   "IOPersonalityPublisher" = "com.apple.driver.AppleIntelCFLGraphicsFramebuffer"
    | |   | | |   "CFBundleIdentifierKernel" = "com.apple.driver.AppleIntelCFLGraphicsFramebuffer"
    | |   | | |   "CFBundleIdentifier" = "com.apple.driver.AppleIntelCFLGraphicsFramebuffer"
    | |   | | |   "IOMatchCategory" = "IOFramebuffer"
    | |   | | |   "NumFrameBuffer" = <00>

NumFrameBuffer=0 says that iGPU isint handling any dispaly atm.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices
  2026-01-28 15:45   ` Lukas Wunner
@ 2026-01-29  4:37     ` Atharva Tiwari
  2026-01-29 10:33       ` Lukas Wunner
  2026-02-02  8:01     ` Atharva Tiwari
  1 sibling, 1 reply; 14+ messages in thread
From: Atharva Tiwari @ 2026-01-29  4:37 UTC (permalink / raw)
  To: lukas
  Cc: airlied, ardb, atharvatiwarilinuxdev, bp, dri-devel,
	francescopompo2, intel-gfx, intel-xe, jani.nikula, javierm,
	joonas.lahtinen, linux-efi, linux-kernel, lszubowi, rodrigo.vivi,
	simona, tursulin, tzimmermann

> As discussed previously, your patch will regress older MacBook Airs
> which use SPI to access keyboard + trackpad if the set_os protocol
> is invoked:
> 
> https://lore.kernel.org/all/ZoJPgSlZJ3ZlU2zL@wunner.de/
> 
> The last time this topic came up, I suggested counting the number of
> GPUs instead of using the DMI quirk.  I even provided a patch but
> nobody with an eGPU bothered to test it, so the thread fizzled out:
> 
> https://lore.kernel.org/all/Z6paeFrjdv7L3mtv@wunner.de/
> 
> Maybe you could give it a spin and verify if it fixes the issue for you?

I tested your patch, and well it works (you still need the 2nd patch to 
avoid a blank screen), but i can see how this will fail
like for example, with the iMacPro (only has dGPU) you would need 2 eGPUs
to turn on apple-set-os.

My opinion is, we disable apple-set-os using a dmi check on the 2013/2014
MacbookAir models.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices
  2026-01-29  4:37     ` Atharva Tiwari
@ 2026-01-29 10:33       ` Lukas Wunner
  2026-01-29 17:53         ` Atharva Tiwari
  0 siblings, 1 reply; 14+ messages in thread
From: Lukas Wunner @ 2026-01-29 10:33 UTC (permalink / raw)
  To: Atharva Tiwari
  Cc: airlied, ardb, bp, dri-devel, francescopompo2, intel-gfx,
	intel-xe, jani.nikula, javierm, joonas.lahtinen, linux-efi,
	linux-kernel, lszubowi, rodrigo.vivi, simona, tursulin,
	tzimmermann

On Thu, Jan 29, 2026 at 04:37:59AM +0000, Atharva Tiwari wrote:
> > As discussed previously, your patch will regress older MacBook Airs
> > which use SPI to access keyboard + trackpad if the set_os protocol
> > is invoked:
> > 
> > https://lore.kernel.org/all/ZoJPgSlZJ3ZlU2zL@wunner.de/
> > 
> > The last time this topic came up, I suggested counting the number of
> > GPUs instead of using the DMI quirk.  I even provided a patch but
> > nobody with an eGPU bothered to test it, so the thread fizzled out:
> > 
> > https://lore.kernel.org/all/Z6paeFrjdv7L3mtv@wunner.de/
> > 
> > Maybe you could give it a spin and verify if it fixes the issue for you?
> 
> I tested your patch, and well it works (you still need the 2nd patch to 
> avoid a blank screen), but i can see how this will fail
> like for example, with the iMacPro (only has dGPU) you would need 2 eGPUs
> to turn on apple-set-os.

I don't quite follow.  The patch counts the number of GPUs and
uses the set_os protocol if there are at least 2 of them.
One dGPU + one eGPU = 2, so the protocol is used.

Am I missing something?

Thanks,

Lukas

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices
  2026-01-29 10:33       ` Lukas Wunner
@ 2026-01-29 17:53         ` Atharva Tiwari
  0 siblings, 0 replies; 14+ messages in thread
From: Atharva Tiwari @ 2026-01-29 17:53 UTC (permalink / raw)
  To: lukas
  Cc: airlied, ardb, atharvatiwarilinuxdev, bp, dri-devel,
	francescopompo2, intel-gfx, intel-xe, jani.nikula, javierm,
	joonas.lahtinen, linux-efi, linux-kernel, lszubowi, rodrigo.vivi,
	simona, tursulin, tzimmermann

> I don't quite follow.  The patch counts the number of GPUs and
> uses the set_os protocol if there are at least 2 of them.
> One dGPU + one eGPU = 2, so the protocol is used.
> 
> Am I missing something?

Well your not, and it was a mistake of me, which i apologize for.

but i still think a MacBookAir dmi check would be better, as
theoretically you can connect a eGPU to a 2013/2014 MacBookAir,
which would enable set-os, and will cause problems in applespi.c

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices
  2026-01-28 15:45   ` Lukas Wunner
  2026-01-29  4:37     ` Atharva Tiwari
@ 2026-02-02  8:01     ` Atharva Tiwari
  1 sibling, 0 replies; 14+ messages in thread
From: Atharva Tiwari @ 2026-02-02  8:01 UTC (permalink / raw)
  To: lukas
  Cc: airlied, ardb, atharvatiwarilinuxdev, bp, dri-devel,
	francescopompo2, intel-gfx, intel-xe, jani.nikula, javierm,
	joonas.lahtinen, linux-efi, linux-kernel, lszubowi, rodrigo.vivi,
	simona, tursulin, tzimmermann

> Maybe you could give it a spin and verify if it fixes the issue for you?

I tested it, and only tested to see if it booted.
now again i tested, and it seems my iGPU and eGPU wasnt detected?
and after futher debuging i found that setup_efi_pci only detected
dGPU, so using update_nr_gpus was useless.

and about the macbookair situation, i say we just exclude macbook from
enabling apple-set-os via a smbios quirk.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-02-02  8:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-28 14:58 [PATCH v2 0/2] Add support for eGPUs on Apple Products Atharva Tiwari
2026-01-28 14:58 ` [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices Atharva Tiwari
2026-01-28 15:45   ` Lukas Wunner
2026-01-29  4:37     ` Atharva Tiwari
2026-01-29 10:33       ` Lukas Wunner
2026-01-29 17:53         ` Atharva Tiwari
2026-02-02  8:01     ` Atharva Tiwari
2026-01-28 14:58 ` [PATCH v2 2/2] drm/i915/display: Disable display for iMac's Atharva Tiwari
2026-01-28 15:23   ` Jani Nikula
2026-01-28 15:37     ` Ville Syrjälä
2026-01-28 16:03       ` Lukas Wunner
2026-01-28 15:49   ` Lukas Wunner
2026-01-28 15:56 ` [PATCH v2 0/2] Add support for eGPUs on Apple Products Lukas Wunner
2026-01-28 17:12   ` Atharva Tiwari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox