From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Bjorn Helgaas <helgaas@kernel.org>,
Gabriele Paoloni <gabriele.paoloni@huawei.com>
Cc: Daniel Axtens <dja@axtens.net>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"Liuxinliang (Matthew Liu)" <z.liuxinliang@hisilicon.com>,
Rongrong Zou <zourongrong@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel.vetter@intel.com>,
Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [PATCH v4] PCI: Support hibmc VGA cards behind a misbehaving HiSilicon bridge
Date: Fri, 14 Jul 2017 06:45:26 +1000 [thread overview]
Message-ID: <1499978726.2865.59.camel@kernel.crashing.org> (raw)
In-Reply-To: <20170713112938.GI4486@bhelgaas-glaptop.roam.corp.google.com>
On Thu, 2017-07-13 at 06:29 -0500, Bjorn Helgaas wrote:
> > Indeed our host controller depends on ARM64 so maybe it would make
> > sense to move the quirk arch/arm64/kernel/pci.c; however regardless
> > why is it strictly required for a VGA device to be legacy one in order
> > to make it the default boot device?
> > i.e. couldn't we have:
> >
> > diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
> > index 0f5b2dd..a6b606c 100644
> > --- a/drivers/gpu/vga/vgaarb.c
> > +++ b/drivers/gpu/vga/vgaarb.c
> > @@ -667,8 +667,7 @@ static bool vga_arbiter_add_pci_device(struct pci_dev *pdev)
> > /* Deal with VGA default device. Use first enabled one
> > * by default if arch doesn't have it's own hook
> > */
> > - if (vga_default == NULL &&
> > - ((vgadev->owns & VGA_RSRC_LEGACY_MASK) == VGA_RSRC_LEGACY_MASK)) {
> > + if (vga_default == NULL) {
> > vgaarb_info(&pdev->dev, "setting as boot VGA device\n");
> > vga_set_default_device(pdev);
> > }
>
> I don't know enough about the VGA arbiter to answer this. This test was
> part of the initial implementation: deb2d2ecd43d ("PCI/GPU: implement VGA
> arbitration on Linux") by Ben.
The above simply uses the first device that has memory and IO enabled
as the default device (you don't need to have a default device).
This is essentially picking up whatever device had been initialized
by the BIOS/firmware as default. This is needed for example on x86
where the BIOS tends to only initialize one device.
I'm not sure what problem you are trying to solve here ?
Cheers,
Ben.
next prev parent reply other threads:[~2017-07-13 20:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 5:08 [PATCH v4] PCI: Support hibmc VGA cards behind a misbehaving HiSilicon bridge Daniel Axtens
2017-07-12 20:04 ` Bjorn Helgaas
2017-07-13 10:29 ` Gabriele Paoloni
2017-07-13 11:29 ` Bjorn Helgaas
2017-07-13 20:45 ` Benjamin Herrenschmidt [this message]
2017-07-14 12:14 ` Gabriele Paoloni
2017-07-13 21:11 ` Alex Williamson
2017-07-13 21:21 ` Benjamin Herrenschmidt
2017-07-14 12:26 ` Gabriele Paoloni
2017-07-14 13:50 ` Benjamin Herrenschmidt
2017-07-14 17:03 ` Gabriele Paoloni
2017-07-14 23:54 ` Benjamin Herrenschmidt
2017-07-14 14:43 ` Alex Williamson
2017-07-14 1:35 ` Will Deacon
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=1499978726.2865.59.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=airlied@linux.ie \
--cc=alex.williamson@redhat.com \
--cc=catalin.marinas@arm.com \
--cc=daniel.vetter@intel.com \
--cc=dja@axtens.net \
--cc=gabriele.paoloni@huawei.com \
--cc=helgaas@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=will.deacon@arm.com \
--cc=z.liuxinliang@hisilicon.com \
--cc=zourongrong@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).