linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Egbert Eich <eich@suse.de>
Cc: Xserver development <xorg@freedesktop.org>,
	Linux Fbdev development list
	<linux-fbdev-devel@lists.sourceforge.net>,
	Egbert Eich <eich@pdx.freedesktop.org>
Subject: Re: [Linux-fbdev-devel] Re: Who is stomping PCI config space?
Date: Sat, 05 Mar 2005 09:27:19 +1100	[thread overview]
Message-ID: <1109975240.5610.297.camel@gaston> (raw)
In-Reply-To: <16936.20345.249542.65736@xf14.local>


> It needs to have it in some central place which doesn't necessarily
> have to be the kernel. 

I think it has to be the kernel so we can include kernel services, like
kernel fbdev's or vgacon in the loop.

> The point is: if Jon needs these registers in an interrupt handler
> he may have to tweak PCI config space form there anyway since another 
> card may currently have VGA routed.

The problem is that a card that has VGA support _and_ MMIO registers.
Even if nobody uses VGA on it, if a different VGA card on the same bus
is active, X will disable IO decoding on the first one (to disable VGA
too).

There isn't a simple way to solve that that I know, except if the card
can be configured to totally ignore VGA accesses, in which case it
doesn't need to be disabled, but X doesn't know it...  (though if we
have a central "arbibrer", the driver for the card can tell it to remove
that card from the arbitration).

In the normal case tho, I don't really see how to deal with that other
than, indeed, switching the enables at interrupt time, when the IRQ gets
in, which will obviously conflict with a concurrent server working on
the "other" card at the same time....

So even with a kernel based arbitrer, the irq scenario isn't possible to
deal with properly, unless VGA decoding can be completely disabled on a
given card, or nobody uses VGA memory accesses on any card. (Most modern
drivers only use non-VGA memory/IO, or even IO are remapped to some
different addresses with some cards).

As soon as two cards are in the system on the same bus segment, with one
of the them needing legacy VGA accesses to the low PCI memory/IO ports,
and the other one potentially decoding that space, there is simply no
solution that I can see with interrupts. 
>  > 
>  > X disables any other VGA card IO/MEM in the system so that at one given
>  > point in time, only one of them will decode VGA cycles. Wether it has
>  > those cards to drive in it's config or not doesn't matter, the problem
>  > at the bus level is the same.
> 
> Right. It however should only do so if one of the cards it is driving 
> itself requires VGA registers for its mode of operation.

Ben.

  parent reply	other threads:[~2005-03-04 22:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-03 19:03 Who is stomping PCI config space? Jon Smirl
2005-03-03 23:07 ` Benjamin Herrenschmidt
2005-03-04  0:15   ` Jon Smirl
2005-03-04  3:03     ` Jon Smirl
2005-03-04  6:40       ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2005-03-04 12:07         ` Egbert Eich
2005-03-04 17:35           ` Jon Smirl
2005-03-04 22:42             ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2005-03-05 19:06               ` Egbert Eich
2005-03-05 22:42                 ` Benjamin Herrenschmidt
2005-03-07 11:19                   ` Egbert Eich
2005-03-08  3:21                     ` Benjamin Herrenschmidt
2005-03-05 17:33             ` Egbert Eich
2005-03-04 17:58           ` Jon Smirl
2005-03-04 22:45             ` Benjamin Herrenschmidt
2005-03-05 19:07               ` Egbert Eich
2005-03-05 22:43                 ` Benjamin Herrenschmidt
2005-03-04 22:27           ` Benjamin Herrenschmidt [this message]
2005-03-05 18:26             ` Egbert Eich
2005-03-05 22:39               ` Benjamin Herrenschmidt
2005-03-07 11:05                 ` Egbert Eich
2005-03-04 12:02       ` Egbert Eich
2005-03-04 11:25   ` Egbert Eich
2005-03-04 22:16     ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2005-03-05 17:36       ` Egbert Eich
2005-03-04 11:12 ` Egbert Eich
2005-03-04 22:51   ` Benjamin Herrenschmidt
     [not found] ` <42278AEC.4080706@dunaweb.hu>
2005-03-04 11:21   ` Egbert Eich

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=1109975240.5610.297.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=eich@pdx.freedesktop.org \
    --cc=eich@suse.de \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=xorg@freedesktop.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).