From: Lukas Wunner <lukas@wunner.de>
To: Aditya Garg <gargaditya08@live.com>
Cc: Ard Biesheuvel <ardb@kernel.org>,
"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Hans de Goede <hdegoede@redhat.com>,
Kerem Karabay <kekrby@gmail.com>,
Orlando Chamberlain <orlandoch.dev@gmail.com>,
"sharpenedblade@proton.me" <sharpenedblade@proton.me>
Subject: Re: [PATCH v3 0/2] efi/x86: Call set_os() protocol on dual GPU Macs
Date: Wed, 24 Jul 2024 18:31:50 +0200 [thread overview]
Message-ID: <ZqEsdkVvwsq-CgeB@wunner.de> (raw)
In-Reply-To: <MA0P287MB021789D73CAD62C16BCF0306B8AA2@MA0P287MB0217.INDP287.PROD.OUTLOOK.COM>
On Wed, Jul 24, 2024 at 04:26:58PM +0000, Aditya Garg wrote:
> > On 24 Jul 2024, at 9:31 PM, Lukas Wunner <lukas@wunner.de> wrote:
> > I note that on x86, the efistub walks over all PCI devices in the system
> > (see setup_efi_pci() in drivers/firmware/efi/libstub/x86-stub.c) and
> > retrieves the Device ID and Vendor ID. We could additionally retrieve
> > the Class Code and count the number of GPUs in the system by checking
> > whether the Class Code matches PCI_BASE_CLASS_DISPLAY. If there's
> > at least 2 GPUs in the system, invoke apple_set_os.
>
> This also looks like a good idea, but I'm not well aware of the pci
> quirks in the Linux kernel. So, would consider it a bug report for
> the maintainers to fix.
This is not a PCI quirk in the kernel. The efistub is a separate
program. I'm saying that the efistub already walks over all PCI devices,
it would be trivial to hook into this to count GPUs, recognize the T2
device or do something else entirely.
Thanks,
Lukas
next prev parent reply other threads:[~2024-07-24 16:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 14:09 [PATCH v3 0/2] efi/x86: Call set_os() protocol on dual GPU Macs Ard Biesheuvel
2024-07-01 14:09 ` [PATCH v3 1/2] efistub/x86: Enable SMBIOS protocol handling for x86 Ard Biesheuvel
2024-07-01 14:09 ` [PATCH v3 2/2] x86/efistub: Call Apple set_os protocol on dual GPU Intel Macs Ard Biesheuvel
2024-07-01 14:17 ` [PATCH v3 0/2] efi/x86: Call set_os() protocol on dual GPU Macs Lukas Wunner
2024-07-01 19:42 ` Aditya Garg
2024-07-17 16:35 ` Aditya Garg
2024-07-17 16:46 ` Ard Biesheuvel
2024-07-17 16:52 ` Aditya Garg
2024-07-17 18:27 ` Sharpened Blade
2024-07-17 18:58 ` Lukas Wunner
2024-07-23 16:25 ` Aditya Garg
2024-07-23 16:26 ` Aditya Garg
2024-07-24 16:01 ` Lukas Wunner
2024-07-24 16:21 ` Aditya Garg
2024-07-24 16:28 ` Lukas Wunner
2024-07-24 16:30 ` Aditya Garg
2024-07-24 16:26 ` Aditya Garg
2024-07-24 16:31 ` Lukas Wunner [this message]
2024-07-24 16:34 ` Aditya Garg
2024-07-25 12:42 ` Ard Biesheuvel
2024-07-25 12:58 ` Aditya Garg
2024-07-25 12:39 ` Ard Biesheuvel
2024-07-25 12:55 ` Aditya Garg
2024-07-28 12:03 ` Orlando Chamberlain
2024-07-29 7:27 ` Ard Biesheuvel
2024-07-29 7:46 ` Aditya Garg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZqEsdkVvwsq-CgeB@wunner.de \
--to=lukas@wunner.de \
--cc=ardb@kernel.org \
--cc=gargaditya08@live.com \
--cc=hdegoede@redhat.com \
--cc=kekrby@gmail.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orlandoch.dev@gmail.com \
--cc=sharpenedblade@proton.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox