linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: benh@kernel.crashing.org (Benjamin Herrenschmidt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] PCI: Support hibmc VGA cards behind a misbehaving HiSilicon bridge
Date: Fri, 14 Jul 2017 23:50:04 +1000	[thread overview]
Message-ID: <1500040204.2865.90.camel@kernel.crashing.org> (raw)
In-Reply-To: <EE11001F9E5DDD47B7634E2F8A612F2E40B399B4@FRAEML521-MBX.china.huawei.com>

On Fri, 2017-07-14 at 12:26 +0000, Gabriele Paoloni wrote:
> diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
> index 92f1452..ab3ad9a 100644
> --- a/drivers/gpu/vga/vgaarb.c
> +++ b/drivers/gpu/vga/vgaarb.c
> @@ -1424,6 +1424,14 @@ static int __init vga_arb_device_init(void)
> ?
> ????????list_for_each_entry(vgadev, &vga_list, list) {
> ????????????????struct device *dev = &vgadev->pdev->dev;
> +
> +???????????????/* if no legacy device has been set as default VGA
> +??????????????? * device, just pick up the first one in the list */
> +???????????????if (vga_default == NULL) {
> +???????????????????????vgaarb_info(dev, "setting as boot VGA device\n");
> +???????????????????????vga_set_default_device(vgadev->pdev);
> +???????????????}
> +
> ?#if defined(CONFIG_X86) || defined(CONFIG_IA64)
> ????????????????/*
> ???????????????? * Override vga_arbiter_add_pci_device()'s I/O based detection 
> 
> Above after we have filled the list of VGA devices by iterating over all
> PCI devices we check if no legacy one has been set as default VGA device
> yet: therefore we set the first VGA device in the list as default one...
> 
> Do you think it would work?

I honestly don't remember all of the details of the arbiter but just
make sure that it won't think that device is enabled for things like
VGA etc... if it's memory/IO decode weren't enabled.

I'd rather we have no default device until a driver actually picks up
though, and then, if we still have no default, use the first driver to
pick up.

Ben.

  reply	other threads:[~2017-07-14 13:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170712050811.3620-1-dja@axtens.net>
2017-07-12 20:04 ` [PATCH v4] PCI: Support hibmc VGA cards behind a misbehaving HiSilicon bridge Bjorn Helgaas
2017-07-13 10:29   ` Gabriele Paoloni
2017-07-13 11:29     ` Bjorn Helgaas
2017-07-13 20:45       ` Benjamin Herrenschmidt
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 [this message]
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=1500040204.2865.90.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).