From nobody Sat May 10 07:38:46 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) client-ip=80.81.252.135; envelope-from=seabios-bounces@seabios.org; helo=mail.coreboot.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from mail.coreboot.org (mail.coreboot.org [80.81.252.135]) by mx.zohomail.com with SMTPS id 1528097403393599.8995946693626; Mon, 4 Jun 2018 00:30:03 -0700 (PDT) Received: from [127.0.0.1] (helo=ra.coreboot.org) by mail.coreboot.org with esmtp (Exim 4.86_2) (envelope-from ) id 1fPjzR-0001Px-Ii; Mon, 04 Jun 2018 09:33:17 +0200 Received: from mx3-rdu2.redhat.com ([66.187.233.73] helo=mx1.redhat.com) by mail.coreboot.org with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1fPjzB-0001O6-KF for seabios@seabios.org; Mon, 04 Jun 2018 09:33:15 +0200 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 57FAF818A6BC for ; Mon, 4 Jun 2018 07:29:24 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-24.ams2.redhat.com [10.36.116.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0092C6353A; Mon, 4 Jun 2018 07:29:21 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BB95C9A901; Mon, 4 Jun 2018 09:29:20 +0200 (CEST) From: Gerd Hoffmann To: seabios@seabios.org Date: Mon, 4 Jun 2018 09:29:12 +0200 Message-Id: <20180604072917.19316-2-kraxel@redhat.com> In-Reply-To: <20180604072917.19316-1-kraxel@redhat.com> References: <20180604072917.19316-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 04 Jun 2018 07:29:24 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Mon, 04 Jun 2018 07:29:24 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-Spam-Score: -6.5 (------) Subject: [SeaBIOS] [PATCH v2 1/6] optionrom: enable non-vga display devices X-BeenThere: seabios@seabios.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SeaBIOS mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: seabios-bounces@seabios.org Sender: "SeaBIOS" X-Duff: Orig. Duff, Duff Lite, Duff Dry, Duff Dark, Raspberry Duff, Lady Duff, Red Duff, Tartar Control Duff X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In case no VGA device was found look for other display devices. Signed-off-by: Gerd Hoffmann --- src/optionroms.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/optionroms.c b/src/optionroms.c index 092393a56c..fc992f649f 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -350,7 +350,9 @@ optionrom_setup(void) // Find and deploy PCI roms. struct pci_device *pci; foreachpci(pci) { - if (pci->class =3D=3D PCI_CLASS_DISPLAY_VGA || pci->have_driver) + if (pci->class =3D=3D PCI_CLASS_DISPLAY_VGA || + pci->class =3D=3D PCI_CLASS_DISPLAY_OTHER || + pci->have_driver) continue; init_pcirom(pci, 0, sources); } @@ -400,10 +402,32 @@ optionrom_setup(void) int ScreenAndDebug; struct rom_header *VgaROM; =20 +static void try_setup_display_other(void) +{ + struct pci_device *pci; + + dprintf(1, "No VGA found, scan for other display\n"); + + foreachpci(pci) { + if (pci->class !=3D PCI_CLASS_DISPLAY_OTHER) + continue; + struct rom_header *rom =3D map_pcirom(pci); + if (!rom) + continue; + dprintf(1, "Other display found at %pP\n", pci); + pci_config_maskw(pci->bdf, PCI_COMMAND, 0, + PCI_COMMAND_IO | PCI_COMMAND_MEMORY); + init_optionrom(rom, pci->bdf, 1); + return; + } +} + // Call into vga code to turn on console. void vgarom_setup(void) { + int have_vga =3D 0; + if (! CONFIG_OPTIONROMS) return; =20 @@ -425,8 +449,11 @@ vgarom_setup(void) continue; vgahook_setup(pci); init_pcirom(pci, 1, NULL); + have_vga =3D 1; break; } + if (!have_vga) + try_setup_display_other(); =20 // Find and deploy CBFS vga-style roms not associated with a device. run_file_roms("vgaroms/", 1, NULL); --=20 2.9.3 _______________________________________________ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios