From: Egbert Eich <eich@suse.de>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: fbdev <linux-fbdev-devel@lists.sourceforge.net>,
Xserver development <xorg@freedesktop.org>
Subject: Re: Who is stomping PCI config space?
Date: Fri, 4 Mar 2005 12:12:45 +0100 [thread overview]
Message-ID: <16936.17069.428202.815866@xf14.local> (raw)
In-Reply-To: jonsmirl@gmail.com wrote on Thursday, 3 March 2005 at 14:03:43 -0500
Jon Smirl writes:
>
> Somebody is changing PCI command from 83 to 80 and disabling my
> radeon's memory and iospace. Who is doing this? It has to be X since
> it doesn't happen if I switch to VT6 or VT8.
>
> Why is X mucking with a card it doesn't have a driver loaded for?
> Where is this happening in the X code?
>
Jon,
Yes, X is donig this as it is assuming that it is in
charge of all the graphics hardware in the machine.
It has to make this assumption as it cannot be sure that
the card has *no* legacy resources open. Without a driver
loaded it has no way of knowing any differently.
It doesn't matter if these legacy ports are used on this
card, it only matters these resources are used by another
card for setup purposes.
A lot of cards do have legacy ports open - even if nobody
uses them and without the driver the Xserver cannot really
do much about this.
At the time this was programmed this assumption was
necessary for the fast majority of cards.
I claim it is still required for a large number of
cards today as when the card has been POSTed the
BIOS usually leaves the legacy ports open.
So far we have no central agent available to schedule
access to shared resources.
If you want to access these cards from inside your
kernel you could just check if they are enabled before
you do and enable them if they aren't.
This works as long as you can be sure nobody else will
access legacy resources from anywhere else - this may
be difficult if you have a machine with more than one
CPU, if you have more than one userland process that
may want to access the HW.
You should make sure to restore the state before you
return.
As a note on the side:
The Xserver doesn't 'stomp' over PCI config space any
more without telling the kernel: The code which does
direct PIO banging for config space access doesn't
get used any more unless the user explicitely *asks*
for it.
The option to do so is well hidden from the user.
This has been this way since X.Org 6.8.0 - I didn't
change this for 6.7.0 for lack of testing.
Egbert.
next prev parent reply other threads:[~2005-03-04 11:12 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
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 [this message]
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=16936.17069.428202.815866@xf14.local \
--to=eich@suse.de \
--cc=jonsmirl@gmail.com \
--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).