From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Matthew Garrett" <mgarrett@chiark.greenend.org.uk>
Cc: "Bjorn Helgaas" <bjorn.helgaas@hp.com>,
linux-pci@atrey.karlin.mff.cuni.cz,
"Dave Airlie" <airlied@linux.ie>, "Andrew Morton" <akpm@osdl.org>,
greg@kroah.com, linux-kernel@vger.kernel.org, pjones@redhat.com,
"Arjan van de Ven" <arjan@linux.intel.com>
Subject: Re: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access
Date: Thu, 4 May 2006 16:40:26 -0400 [thread overview]
Message-ID: <9e4733910605041340r65d47209h2da079d9cf8fceae@mail.gmail.com> (raw)
In-Reply-To: <E1FbjiL-0001B9-00@chiark.greenend.org.uk>
On 5/4/06, Matthew Garrett <mgarrett@chiark.greenend.org.uk> wrote:
> Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
>
> > There's already a "rom" file in sysfs. Could vbetool and friends
> > use that?
>
> Not if you have multiple graphics cards.
Not true, the rom attribute maps the ROM into PCI space where ever the
kernel tells it to and reads it from there. It is the PCI VGA
emulation feature that forces the ROM to appear at C000:0. You can
have the ROM mapped and VGA emulation turned off.
This brings up another major point. X changes the PCI VGA emulation
routing from user space, another thing that it should not be doing. I
have posted patches before providing a sysfs VGA attribute on class
VGA devices. By setting the attribute to 1 you can control the active
VGA emulation device.
This is yet another way that user space can mess up the kernel. If VGA
routing is changes under fbdev (my attribute notifies fbdev, the fbdev
code for processing the notification did get checked in) then the
console will screw up. The usual screw up is that the console goes
blank because hardware fonts are not setup correctly on the new
console.
I also remember posting a patch for initializing all class VGA devices
at boot. This is a complication process since running the ROM will
leave that card as the active VGA device. The initialization code
made sure to set the console back to the original VGA card after the
secondary one was initialized. The initialization process needs to
run a user space app which provides real mode access or an x86
emulator. BenH has the x86 emulator code (people sticking PC hardware
into PowerPCs need the emulator). This code for running the ROM should
go into the kernel tree and work with klibc.
I would really like to see a well designed, comprehensive plan for
handling these issues instead of just providing convenience APIs (that
may be hard to get rid of) for the old X code. I'm willing to help if
people really are serious about fixing the problems.
I wrote down a lot of my thoughts on this area in the State of Linux
Graphics article last summer. There is a large section about kernel
issues.
http://people.freedesktop.org/~jonsmirl/graphics.html
>
> > How do vbetool and X coordinate their usage of "enable"?
>
> vbetool won't run at anything other than a text console, and X won't
> mess with the graphics card if it's not on the current VT. You can mess
> this up if you try hard enough (multihead, for instance) but by and
> large it's a situation that you can avoid.
>
> > What if we throw an in-kernel VGA driver into the mix? But I guess
> > Jon has asked all these questions before; I just didn't get warm
> > fuzzies that there were safe, maintainable answers.
>
> This probably isn't the right long-term answer, but the right long-term
> answer is going to be a very long time away. It's an improvement over
> what we have now. I certainly don't intend to leave vbetool relying on
> it - of course, the "right" answer is for graphics drivers to know how
> to program cards from scratch so we can get rid of vbetool altogether,
> but I'll probably be more concerned about getting my flying car to meet
> new emission standards than I will be by graphics cards at that stage.
>
> --
> Matthew Garrett | mjg59-chiark.mail.linux-rutgers.kernel@srcf.ucam.org
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Jon Smirl
jonsmirl@gmail.com
next prev parent reply other threads:[~2006-05-04 20:40 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-29 8:46 Arjan van de Ven
2006-04-29 8:51 ` Andrew Morton
2006-04-29 8:59 ` Arjan van de Ven
2006-04-29 9:04 ` Dave Airlie
2006-05-02 16:14 ` Bjorn Helgaas
2006-05-02 16:21 ` Greg KH
2006-05-02 16:51 ` Jesse Barnes
2006-05-04 19:09 ` Bjorn Helgaas
2006-05-04 19:11 ` Arjan van de Ven
2006-05-04 19:26 ` Bjorn Helgaas
2006-05-04 19:42 ` Matthew Garrett
2006-05-04 20:40 ` Jon Smirl [this message]
2006-05-04 21:05 ` Peter Jones
2006-05-04 21:17 ` Martin Mares
2006-05-04 21:29 ` Peter Jones
2006-05-04 21:37 ` Martin Mares
2006-05-04 21:38 ` Jon Smirl
2006-05-04 23:22 ` Peter Jones
2006-05-05 19:20 ` Ian Romanick
2006-05-05 20:14 ` Jon Smirl
2006-05-05 20:26 ` Greg KH
2006-05-05 20:35 ` Jon Smirl
2006-05-05 20:43 ` Jon Smirl
2006-05-05 21:10 ` Greg KH
2006-05-05 21:06 ` Greg KH
2006-05-05 21:15 ` Jon Smirl
2006-05-05 22:27 ` Greg KH
2006-05-06 0:05 ` Jon Smirl
2006-05-06 1:57 ` Dave Airlie
2006-05-06 3:39 ` Jon Smirl
2006-05-06 12:42 ` Krzysztof Halasa
2006-05-06 13:08 ` Jon Smirl
2006-05-06 18:10 ` Krzysztof Halasa
2006-05-06 18:24 ` Jon Smirl
2006-05-06 23:16 ` Krzysztof Halasa
2006-05-07 5:56 ` Kyle Moffett
2006-05-07 12:05 ` Krzysztof Halasa
2006-05-07 19:07 ` Kyle Moffett
2006-05-08 0:03 ` Krzysztof Halasa
2006-05-07 13:12 ` Pavel Machek
2006-05-08 14:26 ` Kyle Moffett
2006-05-08 14:54 ` Arjan van de Ven
2006-05-08 4:06 ` Dave Airlie
2006-05-08 5:27 ` Jon Smirl
2006-05-07 8:54 ` Adam Belay
2006-05-14 0:29 ` Benjamin Herrenschmidt
2006-05-14 0:56 ` Jon Smirl
2006-05-14 23:57 ` Benjamin Herrenschmidt
2006-05-15 0:14 ` Jon Smirl
2006-05-14 0:57 ` Patrick McFarland
2006-05-14 1:11 ` Jon Smirl
2006-05-04 21:18 ` Jon Smirl
2006-05-04 21:38 ` Peter Jones
2006-05-04 21:48 ` Jon Smirl
2006-05-04 21:57 ` Peter Jones
2006-05-04 22:05 ` Jon Smirl
2006-05-04 19:49 ` Arjan van de Ven
2006-05-15 2:10 ` Eric W. Biederman
2006-05-02 16:38 ` Jon Smirl
2006-05-02 16:45 ` Arjan van de Ven
2006-05-02 16:59 ` Jon Smirl
2006-05-02 17:00 ` Arjan van de Ven
2006-05-02 17:13 ` Jon Smirl
2006-05-02 18:27 ` Arjan van de Ven
2006-05-02 19:00 ` Jon Smirl
2006-05-02 19:29 ` Peter Jones
2006-05-02 21:40 ` Dave Airlie
2006-05-02 21:52 ` Jon Smirl
2006-05-02 23:36 ` Dave Airlie
2006-05-03 0:19 ` Matthew Wilcox
2006-05-03 0:26 ` Valdis.Kletnieks
2006-05-03 1:24 ` Jon Smirl
2006-05-03 1:30 ` Dave Airlie
2006-05-03 6:02 ` Arjan van de Ven
2006-05-03 13:23 ` Jon Smirl
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=9e4733910605041340r65d47209h2da079d9cf8fceae@mail.gmail.com \
--to=jonsmirl@gmail.com \
--cc=airlied@linux.ie \
--cc=akpm@osdl.org \
--cc=arjan@linux.intel.com \
--cc=bjorn.helgaas@hp.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=mgarrett@chiark.greenend.org.uk \
--cc=pjones@redhat.com \
/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
all inboxes | Powered by JetHome®