From patchwork Wed Aug 20 07:11:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bruno_Pr=C3=A9mont?= X-Patchwork-Id: 4747851 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0E63C9F377 for ; Wed, 20 Aug 2014 07:17:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03C4D2016C for ; Wed, 20 Aug 2014 07:17:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1C87120155 for ; Wed, 20 Aug 2014 07:17:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 523696E69D; Wed, 20 Aug 2014 00:17:09 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtprelay.restena.lu (smtprelay.restena.lu [158.64.1.62]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D00C6E69D for ; Wed, 20 Aug 2014 00:17:07 -0700 (PDT) Received: from pluto (pluto.restena.lu [IPv6:2001:a18:1:8::156]) by smtprelay.restena.lu (Postfix) with ESMTPS id 67E4043194; Wed, 20 Aug 2014 09:11:52 +0200 (CEST) Date: Wed, 20 Aug 2014 09:11:52 +0200 From: Bruno =?UTF-8?B?UHLDqW1vbnQ=?= To: Andreas Noever Subject: Re: [PATCH 0/2] x86, ia64: Move EFI_FB vga_default_device() initialization to pci_vga_fixup() Message-ID: <20140820091152.76cd4e1a@pluto> In-Reply-To: <20140820075508.74f5b622@pluto> References: <20140514224339.7f8be3a9@neptune.home> <20140527234255.GJ11907@google.com> <20140602201650.35f0e936@neptune.home> <20140602201926.4d476818@neptune.home> <20140625005501.7ff7e982@neptune.home> <20140705171503.GC6247@google.com> <20140810112654.1bf684d6@neptune.home> <20140810183411.19370721@neptune.home> <20140816192135.34260115@neptune.home> <20140820075508.74f5b622@pluto> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.24; x86_64-pc-linux-gnu) Mime-Version: 1.0 Cc: Matthew Garrett , Linux PCI , DRI mailing list , Greg Kroah-Hartman , Bjorn Helgaas X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 20 Aug 2014 07:55:08 +0200 Bruno Prémont wrote: > On Tue, 19 Aug 2014 17:45:00 +0200 Andreas Noever wrote: > > On Sat, Aug 16, 2014 at 7:21 PM, Bruno Prémont wrote: > > > This series improves on commit 20cde694027e (x86, ia64: Move EFI_FB > > > vga_default_device() initialization to pci_vga_fixup()): > > > - cleanup remaining but always-true #ifndefs > > > - fix boot regression on dual-GPU Macs > > > > > > Andreas, can you please test this series? It is a modification from > > > previous testing patch that should still work fine for you. > > > That testing patch would have been failing X startup on old BIOS systems > > > booted with vga=normal (or otherwise in VGA text mode). > > > > > > > > > Greg, in case you have scheduled above-mentioned commit for your next > > > stable iteration, please hold it back in the queue until this follow-up > > > has landed and can be included within the same stable update as alone > > > that patch regresses for Macs with dual-GPU and using efifb. > > > > > > Bruno > > > > Fails again (with and without efifb). > > > > The vga_set_default_device in vga_arbiter_add_pci_device is at fault. > > It sets the boot video device to intel. Removing it makes the system > > bootable again. > > Could you provide your whole kernel log? I would like to understand > how your vga devices are setup and why it starts the wrong way. > > If you can grab kernel log from both working and failing setups it > would be even better. The failing one is interesting for where exactly it > starts failing at boot. While collecting debug logs, please apply following patch to get PCI command and bridge control registers as configured when vgaarb looks at them. diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c index af02597..8c8e7af 100644 --- a/drivers/gpu/vga/vgaarb.c +++ b/drivers/gpu/vga/vgaarb.c @@ -554,6 +554,7 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev) * clear that below if the bridge isn't forwarding */ pci_read_config_word(pdev, PCI_COMMAND, &cmd); + pr_info("vgaarb: PCI:%s PCI_COMMAND=%04x\n", pci_name(pdev), (unsigned int)cmd); if (cmd & PCI_COMMAND_IO) vgadev->owns |= VGA_RSRC_LEGACY_IO; if (cmd & PCI_COMMAND_MEMORY) @@ -567,6 +568,7 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev) u16 l; pci_read_config_word(bridge, PCI_BRIDGE_CONTROL, &l); + pr_info("vgaarb: PCI:%s, bridge PCI:%s PCI_BRIDGE_CONTROL=%04x\n", pci_name(pdev), pci_name(bridge), (unsigned int)l); if (!(l & PCI_BRIDGE_CTL_VGA)) { vgadev->owns = 0; break;