linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	klebers <klebers@linux.vnet.ibm.com>,
	sparclinux@vger.kernel.org,
	Lucas Kannebley Tavares <lucaskt@linux.vnet.ibm.com>,
	Brian King <brking@linux.vnet.ibm.com>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 3/3] powerpc: Set default VGA device
Date: Mon, 8 Apr 2013 15:21:25 +1000	[thread overview]
Message-ID: <20130408052124.GA9550@concordia> (raw)
In-Reply-To: <CAErSpo4LsJjRkw6UektwqW8m1NXdU6BTjhTDA9eORM3z3qDcdA@mail.gmail.com>

On Fri, Apr 05, 2013 at 02:24:09PM -0600, Bjorn Helgaas wrote:
> On Thu, Apr 4, 2013 at 3:58 PM, Brian King <brking@linux.vnet.ibm.com> wrote:
> > @@ -1725,3 +1726,15 @@ static void fixup_hide_host_resource_fsl
> >  }
> >  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MOTOROLA, PCI_ANY_ID, fixup_hide_host_resource_fsl);
> >  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, fixup_hide_host_resource_fsl);
> > +
> > +static void fixup_vga(struct pci_dev *pdev)
> > +{
> > +       u16 cmd;
> > +
> > +       pci_read_config_word(pdev, PCI_COMMAND, &cmd);
> > +       if ((cmd & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) || !vga_default_device())
> > +               vga_set_default_device(pdev);
> > +
> > +}
> > +DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
> > +                             PCI_CLASS_DISPLAY_VGA, 8, fixup_vga);
> 
> This not really an arch-specific issue, so it's a shame to add another
> arch-specific quirk for it (in addition to the x86 and ia64 ones we
> already have).
> 
> In b5e4efe7e0, Eiichiro Oiwa <eiichiro.oiwa.nm@hitachi.com> tried to
> make this quirk generic, but the implementation was naive and it
> didn't work for sparc64.  There's a good thread about the sparc issue
> at https://lkml.org/lkml/2006/10/19/17
> 
> The outcome was to basically revert back to arch-specific quirks with
> 6b5c76b8e2, but I think the generic version probably could have been
> made to work, possibly with a pcibios hook or something for anything
> that really is arch-dependent, like the shadowed ROM image.
> 
> This particular patch is arch-specific, and I'm not going to try to
> nack it because I'm not the powerpc maintainer, but I will certainly
> try to help you if you want to push on making a generic version.

OK.

Looking at x86, ia64 and ours, there's a fair bit of difference.

x86/ia64 both walk up the parents checking PCI_BRIDGE_CTL_VGA, which
powerpc doesn't (though maybe it should?).

x86/ia64 set IORESOURCE_ROM_SHADOW, which powerpc doesn't.

ia64 doesn't call vga_set_default_device(), x86 and powerpc do.

So we'll merge this and maybe someone can tease out the common bits, but
personally I don't see that there's an obvious chunk of generic logic.

cheers

  reply	other threads:[~2013-04-08  5:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04 21:58 [PATCH 3/3] powerpc: Set default VGA device Brian King
2013-04-05  6:52 ` Michael Ellerman
2013-04-05 15:38   ` Brian King
2013-04-05 20:24 ` Bjorn Helgaas
2013-04-08  5:21   ` Michael Ellerman [this message]
2013-04-08  6:39     ` Benjamin Herrenschmidt

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=20130408052124.GA9550@concordia \
    --to=michael@ellerman.id.au \
    --cc=bhelgaas@google.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=klebers@linux.vnet.ibm.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lucaskt@linux.vnet.ibm.com \
    --cc=sparclinux@vger.kernel.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).