From nobody Sat Feb 7 15:35:23 2026 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8EDF3644BC for ; Wed, 28 Jan 2026 14:59:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769612363; cv=none; b=WoO068VDrGStEO9R9BgSvzHdIuklxL+f+lmJLwtoMUB80hlSXtCDmchZEJHYcQIaAYRBwRYotfPHJ8Th3m2VfwqP+rZUJy7bbLgTNmTmc5jXuUvgEdw69n9H8X4smSO+GrBbyT/wUuFqg3wL5NUj8K9pCgvIejZksMGkBYB49yk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769612363; c=relaxed/simple; bh=shI3m5HW3zUOkgaJnc9JS64xYY2D3nRhnNuumTaEZy4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tnrb3oxwAYvoWuIOZLugWfJGngS9YxErPRthPUpFWZyiVNqs+9WRexcH4QBG+UPuIhmB3RKj2zEzGrTjPOW52xQdWYMy+P5hqvDYouONKCcz4n9jAvn8PDp/Sb22QDVG0cw4ZQAIhhcHUlJGPNmqx3K0vttuF2rjpFM5x4YPAb0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nOkLgXRr; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nOkLgXRr" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2a79ded11a2so43739835ad.3 for ; Wed, 28 Jan 2026 06:59:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769612361; x=1770217161; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vGJMSx3RqPnXMSF3iMxugpnUOfI/BDwqereywSHSzkk=; b=nOkLgXRrNdKUYduO4d8YqBkojOq5MrukBoxGZGSn7whCvi8JFdp+lDdhbEigAlYcqF QBCGufuoMHXtalEY342S3Be4BpCk8NnVuTmoj7LsLi6uZB3SN69pkqFcL1g0ZY9NbDaV hjwN1f2QylCV1wVH4ENXTEly1yAWzT4ViugQR5RNUjLWPx0sbYOuPPkh/erywgwbkZsr RIENiKN4BRNNUXvb4ODRK8Y2qlJAFeCdcEpmoOAUxJsknl82Y/sqjm1d3TtX+yUPI8bN f85Skk6ETZZyHPqit5p4pKS3nsdZ40ioCNs6ZRxHOpH2oZGu3njKbw4wdvmLHSIDyJba +Z9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769612361; x=1770217161; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=vGJMSx3RqPnXMSF3iMxugpnUOfI/BDwqereywSHSzkk=; b=M5+5w1H3mD0KauMQLhM3sFVCUAC80gE9Az/ydrJzd+YCuhpmviRZQIWCFD0yaU9woE /WdklNwWD3lbTqEuDB5zXViXYCNu8N11Zx8ML0sKYx48eAdqg9T7kjyykcasAV+N4rGP Ql+kVXOnhTf+OapCKzgUb4xheQy37ak8khbugTxk3ZbAr0kSDIq4uag944GkKI3HohIP GgQfM6dVhLI01MVllMVSUt9SM9pq8jHzq+Q/miqkOQgtBzYUCpxwMb50V7X382mQN/X7 72Ae+rScHW8b3+94A3G6a8jOq5azc7o+r9+8nBUhk147SMZniIVW/kc4cGoibpmhK7D2 Jd2Q== X-Forwarded-Encrypted: i=1; AJvYcCUpDytLAegQdmtcBI7kwHgmkLLvbumPTh3c8KwEFN3h/vAK/odg+re5TGusePg+e1Si2ads7rJNPfUcOyY=@vger.kernel.org X-Gm-Message-State: AOJu0YyP9PpELQQVkvcOtB+sQdwWU78eZ7jW2/NRwoZf7y8Bxe/LMig0 7apZ8vDCKju7TYGuEKQc7OnGbYu3Gr6erzUUC2loGdKB6LW6CJ0IBec= X-Gm-Gg: AZuq6aLttJCMSBedLpsEu/f0EI5Bz9vDpuEd3AspC9b7UY0R71CKMLZuqHrUvqkWliq Enu6GAy3Yy8vioT8wejoikJipCRBQ+i3VtUDIHKMzQAi0hpHqBoH0KcufmYeXE50ZsZwlF/tKwJ 1C7994+Dpy+zjOCbpYotlrToHDZIldcyn0ZqyFjmYoLj9m1Mfw+ETkDmacwAdMg5MVtuEcO4eLD 5g5QsG0BIMrDb58vm+o+OZ25GSgh1SKgLuMRBAXEi8eY/NKgKBBLLbtvGMfeK8HucPfGUMRn7KM YgAEgdiAjXtPHSERUuRqDUbr3wBTbEoVTTyw5ENq33YuObu+BEfWa3X6RFs4y8vvhhKkUCJz1WR MczOWXS1Q0mB9439je+8Dw9PiI9gSAC/Mlwm1OON0mZx1ITPTwZ5RD7knjadct2HMuim7uE50fb WzvOavAmCif4V0qyJDJf3FcnI= X-Received: by 2002:a17:903:4410:b0:296:2b7a:90cd with SMTP id d9443c01a7336-2a870db7c28mr53750585ad.32.1769612360659; Wed, 28 Jan 2026 06:59:20 -0800 (PST) Received: from at.. ([171.61.161.8]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a88b5d9a7bsm25820235ad.79.2026.01.28.06.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 06:59:20 -0800 (PST) From: Atharva Tiwari To: 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@vger.kernel.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 1/2] efi/libstub: enable apple-set-os for all apple devices Date: Wed, 28 Jan 2026 14:58:37 +0000 Message-ID: <20260128145855.1071-2-atharvatiwarilinuxdev@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260128145855.1071-1-atharvatiwarilinuxdev@gmail.com> References: <20260128145855.1071-1-atharvatiwarilinuxdev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- 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_reco= rd(u8 type) =20 static bool apple_match_product_name(void) { - static const char type1_product_matches[][15] =3D { - "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; =20 record =3D (struct efi_smbios_type1_record *) (efi_get_smbios_record(1) ?: get_table_record(1)); if (!record) return false; =20 - product =3D efi_get_smbios_string(record, product_name); - if (!product) + vendor =3D efi_get_smbios_string(record, manufacturer); + if (!vendor) return false; =20 - for (int i =3D 0; i < ARRAY_SIZE(type1_product_matches); i++) { - if (!strcmp(product, type1_product_matches[i])) - return true; - } + if (!strcmp(vendor, "Apple Inc.")) + return true; =20 return false; } --=20 2.43.0 From nobody Sat Feb 7 15:35:23 2026 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6A973644DD for ; Wed, 28 Jan 2026 14:59:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769612371; cv=none; b=aCPDaAlnhdm7It06I52vBt6QUjOeXtQUirwNR6uHykOEal+kTZH3ZQ3UjxXOjHsnSrw9fiKf2p/Yw2x3phjEfqoBta15A5NrpNPCNKWmeXbLjncRJS/AG9gS62GEF9tj//iob7wSiAkI3Rnt/LSywFzmftCysHIPjVWBQSbd0tU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769612371; c=relaxed/simple; bh=XEpzoWGNMHcqtb/EIFRdGrXPkXPqm8L5EZte7iDbRp8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sz9cQccY+y/r2IXKVCvSbyT76MAFSVA3mNrRzLEy4XcueZAeEy5CGSYU6h6xDxUJFdpVQ0I2LFqmJ8fHO74D2ZvOUuhv0kw5Quh0HssLjuMB4BVrkDPtPekrm7IOardAOVJNOxaxUT0dYNGb3k2ikKR7EsAI/fxVFRoqxG4Wbfc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Z5hbWPw/; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z5hbWPw/" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2a0834769f0so46345505ad.2 for ; Wed, 28 Jan 2026 06:59:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769612369; x=1770217169; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aXyZBm2HT5a2syRm7I8O8JEOj9+5Hm8S0vVHV9UIr+Q=; b=Z5hbWPw/vEnF8xiqlhvG3G/HHfGT3HkRz3ZbWVIFLZkgTIocVINxW7I/vwmty0n1Cs 8ioFsX9tyxbx/lxW+53IX/QyOxVNkoKlThGO22Tuj3lph7Tbdm8T8HwL7aySkJB/mL1a NCazhbizFG9M/EaD0bSwwQM7hxlks5HfEHrhQg2Q2WdQUIu6dK/1GSPlTBwdfijoHVzA W5cG9tzZPXViAJDf2NpvhTfCMFGs0MyrWdZlM2Am4WXz7EJSIOeyBWMpyiqlgWZfhZXC D44CDgXCW0HxpferPMXi37MeD7VLh2TeDG2QFfd4XusI01T6KYXABPaFSgxoyapyLPt9 wl2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769612369; x=1770217169; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=aXyZBm2HT5a2syRm7I8O8JEOj9+5Hm8S0vVHV9UIr+Q=; b=JEXM7MpeE51QizeR91KsZYzpU82dkpNR/C/ya2nRCX70uHW2AmMudlItjux9211e2c 7BKJ42BexfNz+UllSwXp1R7yauoiunR4yStu/shyPnhyMqqxdUPx7qJ9BNF6Ul9LT96r vJgqiSkKKgRuX1cl6fhsd3v9mv9UYasqUHFadm4/t6QPQh3VKmvh9ok/L38Zm17bvs1N 0d3lyB6jNRX9Y+zpI5gRjJhBCqEJfRzpa9cDRPt12eeq+AOiGVOq85slTk2OSC0+LAyA cp0p3epd03hE1fI//gkYbtVPuG2bTYBFaAG8ysbVqH6/yxNkCTjD0ueINRq38MZ5iCuo EDew== X-Forwarded-Encrypted: i=1; AJvYcCVVKetypiIw7e1UpT6czYrc1z1ency4wAt7qqESCynv6NjLt+uO8QQVy8A8gtAl8Z8/ePPP8C3QWxT+0E0=@vger.kernel.org X-Gm-Message-State: AOJu0YxEK71vZeUSHeRLXtP9cmpPwgv++nH66h5EsW/TcJOkPqn4zc7Q SnTF/WOqygQYoPcQedv/a2f+9i6BCdO8H5o5AP+oGXvy4w6nZqE+X18= X-Gm-Gg: AZuq6aIS/75VOT90psBuVKo3LvBeiOioGZmqoXqM3vLF4/lO1B9MXCjwGz8VwjfQZZc gPulaRze6kzXUtadXx25xo6lE4r6kNGV+JnsUQGQ2IR6pSLVvubxGQCPR0eQADvuNWqOnKcS8St ycn4ZKLHqmIKojD5CRAga5y1DMyYJGJ/9bZsf1DF4qBw98/I8TE5A4hl63RcKIYo3Nn8h0quf4m j8rZyzOiPMKh/Hyg7rI2SsH8/x1UfhfTMWUDb+VLqQphhZ0XDr5acDFHXQktbSDossL2maJBVO3 eU3c0MMOtAc9lRP9NJWgXCU7+ew2yDITS/S8rigd+xEi7Rr/cnkjnSu2EHS9QwakUna9KJIVe/F L9TGlhhV2bFn+U8D3YK+wav+bE/3cv1wScpKLwpjEX8ExtHhTWOo4whTEZxukNgrB727WMg+Wnz f+QF3R6WLHNgP0 X-Received: by 2002:a17:902:ce0d:b0:2a7:d7b8:7661 with SMTP id d9443c01a7336-2a870d536c7mr48989305ad.4.1769612368925; Wed, 28 Jan 2026 06:59:28 -0800 (PST) Received: from at.. ([171.61.161.8]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a88b5d9a7bsm25820235ad.79.2026.01.28.06.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 06:59:28 -0800 (PST) From: Atharva Tiwari To: 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@vger.kernel.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 2/2] drm/i915/display: Disable display for iMac's Date: Wed, 28 Jan 2026 14:58:38 +0000 Message-ID: <20260128145855.1071-3-atharvatiwarilinuxdev@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260128145855.1071-1-atharvatiwarilinuxdev@gmail.com> References: <20260128145855.1071-1-atharvatiwarilinuxdev@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Disable display on iMacs, as they can't do link training on the internal display. (tested on iMac20,1) Signed-off-by: Atharva Tiwari Reviewed-by: Jani Nikula --- .../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 =C2=A9 2023 Intel Corporation */ =20 +#include #include =20 #include @@ -1435,7 +1436,18 @@ static bool has_no_display(struct pci_dev *pdev) {} }; =20 - return pci_match_id(ids, pdev); + static const struct dmi_system_id dmi_ids[] =3D { + { + .ident =3D "Apple Inc. iMac", + .matches =3D { + 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); } =20 #define INTEL_DISPLAY_DEVICE(_id, _desc) { .devid =3D (_id), .desc =3D (_d= esc) } --=20 2.43.0