public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Greg KH <greg@kroah.com>, Andrew Morton <akpm@osdl.org>,
	Jon Smirl <jonsmirl@gmail.com>,
	linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org
Subject: Re: [patch 2.6] remove PCI_BRIDGE_CTL_VGA handling from setup-bus.c
Date: Fri, 15 Jul 2005 01:44:36 +0400	[thread overview]
Message-ID: <20050715014436.A613@den.park.msu.ru> (raw)
In-Reply-To: <20050714145327.B7314@flint.arm.linux.org.uk>; from rmk+lkml@arm.linux.org.uk on Thu, Jul 14, 2005 at 02:53:27PM +0100

On Thu, Jul 14, 2005 at 02:53:27PM +0100, Russell King wrote:
> What happens when there is no firmware?

It shouldn't be a problem. These days we have a lot of arch hooks
in the PCI layer. I'd probably start with the following:

static void __init
pcibios_enable_p2p_vga_fwd(struct pci_dev *dev)
{
	u16 class = dev->class >> 8;
	struct pci_bus *b;

	if (class == PCI_CLASS_DISPLAY_VGA ||
	    class == PCI_CLASS_NOT_DEFINED_VGA) {
		for (b = dev->bus; b->parent; b = b->parent) {
			b->bridge_ctl |= PCI_BRIDGE_CTL_VGA;
		}
	}
}

DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_enable_p2p_vga_fwd);

> I'm sure this code would not have been added had there not been a reason
> for it.  Do we know why it was added?

It was quite a few years ago, so I don't recall all details...
I think some old alphas cannot cope with VGA behind the p2p bridges.
But I also recall that this code was problematic on alpha with multiple
VGA cards.
Note that setup-bus code in 2.4 does more reasonable thing - it
enables VGA port forwarding *only* for the first (by PCI enumeration)
VGA device, and doesn't enable this for others (if any). Unlike 2.6 :-(

Ivan.

  parent reply	other threads:[~2005-07-14 21:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-14 11:53 [patch 2.6] remove PCI_BRIDGE_CTL_VGA handling from setup-bus.c Ivan Kokshaysky
2005-07-14 13:27 ` Jon Smirl
2005-07-14 13:53 ` Russell King
2005-07-14 14:07   ` Jon Smirl
2005-07-14 21:46     ` Ivan Kokshaysky
2005-07-14 22:39       ` Jon Smirl
2005-07-14 23:08         ` Ivan Kokshaysky
2005-07-15 14:33       ` Benjamin Herrenschmidt
2005-07-14 21:44   ` Ivan Kokshaysky [this message]
2005-07-14 22:42     ` Jon Smirl
2005-07-14 23:33       ` Ivan Kokshaysky
2005-07-18 19:51   ` Grant Grundler

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=20050715014436.A613@den.park.msu.ru \
    --to=ink@jurassic.park.msu.ru \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=jonsmirl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /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