From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: "Dave Airlie" <airlied@linux.ie>,
"Felix Kühling" <fxkuehl@gmx.de>,
"DRI Devel" <dri-devel@lists.sourceforge.net>,
lkml <linux-kernel@vger.kernel.org>,
"Linus Torvalds" <torvalds@osdl.org>
Subject: Re: radeon-pre-2
Date: Mon, 13 Sep 2004 16:04:35 +0100 [thread overview]
Message-ID: <1095087860.14582.37.camel@localhost.localdomain> (raw)
In-Reply-To: <9e47339104091308063c394704@mail.gmail.com>
On Llu, 2004-09-13 at 16:06, Jon Smirl wrote:
> It also needs something to sort out both drivers using pci_drvdata()
> to get to their private data. For example in the hotplug routines you
> only get passed a pdev and you want to use that to locate your private
> data.
The hotplug routines for vga objects in the code I posted get passed
vga_dev objects. You can put what you like in those. I guessed at
"memory manager" "dri" and "framebuffer0" being the ones to create for
now but we can invent anything thats more appropriate.
> It also needs to track pci_enable_device() so that if one driver
> unloads it won't turn the device off for the other driver.
The ->remove function is passed the number of remaining clients for
exactly this reason. We could move the resource grabbing up the tree.
IRQ handling is rather harder. Quiescing and handing back the IRQ on
lock loss is ugggggggggly so I want to think about it - it works but its
not nice.
Should pci_enable and friends be done by the vga class driver- it can do
this and it would have to do it if it did the hotplug ?
> VGA routing needs to be supported. I attached the code I was writing
> for that. I was in the middle of writing it so it doesn't compile.
> This code should be integrated into the VGA driver.
Agreed.
> It needs to integrate into VGAcon. VGAcon should require the vga
> device before loading. The resource reservation code in VGAcon needs
> to be moved to the VGA driver. If you use a command to switch the
> active VGA device, VGAcon needs to reset itself for the new device.
I saw vgacon as being a client of the vga class driver like the various
fb drivers would be.
> VGA driver needs to generate hotplug events for the VGA device that
> indicate if they are primary or secondary. If they are secondary there
> needs to be a user space reset program that uses the new ROM hooks to
> reset the card.
The VGA driver at the moment doesn't really know about legacy vga space.
That was something I wanted to touch last of all because it is foul. It
can do this and as you say its the perfect person to issue the hotplug
notifications. It also needs to do it for vesafb so if it is handed an
ISA hole it can work out the right PCI device.
> It should support more than two drivers, I forgot to check, does it already?
As many as you want. Just change the array size or the number
registered. One neat trick we can support is adding extra devices when
necessary - thus if the boot code in user space boots a card and decides
its multihead we'd want to add extra heads.
> fbdev takes a snapshot of the video registers when it loads. When you
> unload it it writes those registers back. That doesn't work if you
> load from an xterm and rmmod it from the command line. It snapshots
> the card in graphics mode and then restores it in an environment
> expecting text mode.
Big lock issue. You get told if someone else ate your environment. Being
more polite about that would help performance a ton. You know who had
the lock before and who has it now - so we can be intelligent about
->release cleanup I hope. (eg FB0 finds FB1 had it last it might do a
minimal restore)
> Something needs to be done for DMA processing. What if I get an
> interrupt that the DMA queue has been completed but we've switched to
> a driver that doesn't understand DMA? I guess the only safe thing to
> do is make sure all DMA queue are finished before releasing control.
The ->remove path takes the lock (so calls ->release) and then drops it
with no callback needed so providing the hand over code is robust this
will come for free.
Alan
next prev parent reply other threads:[~2004-09-13 16:17 UTC|newest]
Thread overview: 101+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E3389AF2-0272-11D9-A8D1-000A95F07A7A@fs.ei.tum.de>
[not found] ` <DA459966-02B9-11D9-A8D1-000A95F07A7A@fs.ei.tum.de>
[not found] ` <9e47339104090917353554a586@mail.gmail.com>
[not found] ` <Pine.LNX.4.58.0409100209100.32064@skynet>
[not found] ` <9e47339104090919015b5b5a4d@mail.gmail.com>
[not found] ` <20040910153135.4310c13a.felix@trabant>
[not found] ` <9e47339104091008115b821912@mail.gmail.com>
[not found] ` <1094829278.17801.18.camel@localhost.localdomain>
[not found] ` <9e4733910409100937126dc0e7@mail.gmail.com>
[not found] ` <1094832031.17883.1.camel@localhost.localdomain>
2004-09-10 17:22 ` radeon-pre-2 Jon Smirl
2004-09-10 17:04 ` radeon-pre-2 Alan Cox
2004-09-10 18:40 ` radeon-pre-2 Jon Smirl
2004-09-10 22:19 ` radeon-pre-2 Dave Airlie
2004-09-10 22:00 ` radeon-pre-2 Alan Cox
2004-09-10 23:24 ` radeon-pre-2 Dave Airlie
2004-09-11 7:40 ` radeon-pre-2 Geert Uytterhoeven
2004-09-11 8:42 ` radeon-pre-2 Keith Whitwell
2004-09-11 13:59 ` radeon-pre-2 Alan Cox
2004-09-11 0:47 ` radeon-pre-2 Vladimir Dergachev
2004-09-11 8:43 ` radeon-pre-2 Keith Whitwell
2004-09-11 12:23 ` radeon-pre-2 Mike Mestnik
2004-09-11 15:39 ` radeon-pre-2 Vladimir Dergachev
2004-09-11 14:14 ` radeon-pre-2 Alan Cox
2004-09-11 0:50 ` radeon-pre-2 Dave Airlie
2004-09-11 3:30 ` radeon-pre-2 Michel Dänzer
2004-09-11 5:19 ` radeon-pre-2 Dave Airlie
2004-09-11 6:12 ` radeon-pre-2 Michel Dänzer
2004-09-11 7:11 ` radeon-pre-2 Vladimir Dergachev
2004-09-11 14:36 ` radeon-pre-2 Alan Cox
2004-09-11 15:53 ` radeon-pre-2 Vladimir Dergachev
2004-09-11 15:14 ` radeon-pre-2 Alan Cox
2004-09-11 17:10 ` radeon-pre-2 Vladimir Dergachev
2004-09-11 16:20 ` radeon-pre-2 Alan Cox
2004-09-11 17:49 ` radeon-pre-2 Vladimir Dergachev
2004-09-11 17:59 ` radeon-pre-2 Jon Smirl
2004-09-11 18:05 ` radeon-pre-2 Vladimir Dergachev
2004-09-11 18:09 ` radeon-pre-2 Jon Smirl
2004-09-12 1:55 ` radeon-pre-2 Mike Mestnik
2004-09-11 9:20 ` radeon-pre-2 Antonino A. Daplas
2004-09-11 14:40 ` radeon-pre-2 Alan Cox
2004-09-11 16:34 ` radeon-pre-2 Jon Smirl
2004-09-11 14:33 ` radeon-pre-2 Alan Cox
2004-09-11 16:46 ` radeon-pre-2 Jon Smirl
2004-09-11 16:21 ` radeon-pre-2 Alan Cox
2004-09-11 17:27 ` radeon-pre-2 Jon Smirl
2004-09-13 11:40 ` radeon-pre-2 Keith Whitwell
2004-09-11 19:10 ` radeon-pre-2 Hamie
2004-09-11 23:20 ` radeon-pre-2 Alan Cox
2004-09-12 9:13 ` radeon-pre-2 Geert Uytterhoeven
2004-09-12 11:36 ` radeon-pre-2 Hamie
2004-09-12 17:31 ` radeon-pre-2 Alan Cox
2004-09-11 16:23 ` radeon-pre-2 Alan Cox
2004-09-11 14:25 ` radeon-pre-2 Alan Cox
2004-09-12 22:42 ` radeon-pre-2 Dave Airlie
2004-09-12 23:03 ` radeon-pre-2 Linus Torvalds
2004-09-13 0:27 ` radeon-pre-2 Michel Dänzer
2004-09-13 0:45 ` radeon-pre-2 Vladimir Dergachev
2004-09-13 0:52 ` radeon-pre-2 Michel Dänzer
2004-09-13 14:52 ` radeon-pre-2 Vladimir Dergachev
2004-09-13 13:57 ` radeon-pre-2 Alan Cox
2004-09-13 15:20 ` radeon-pre-2 Vladimir Dergachev
2004-09-13 15:07 ` radeon-pre-2 Alan Cox
2004-09-13 15:20 ` radeon-pre-2 Linus Torvalds
2004-09-13 19:21 ` radeon-pre-2 Alex Deucher
2004-09-13 20:42 ` radeon-pre-2 David Bronaugh
2004-09-13 21:57 ` radeon-pre-2 Alex Deucher
2004-09-13 16:26 ` radeon-pre-2 Michel Dänzer
2004-09-13 6:05 ` radeon-pre-2 Alex Deucher
2004-09-13 16:29 ` radeon-pre-2 Michel Dänzer
2004-09-13 6:41 ` radeon-pre-2 Arjan van de Ven
2004-09-13 11:26 ` radeon-pre-2 Alan Cox
2004-09-13 15:06 ` radeon-pre-2 Jon Smirl
2004-09-13 15:04 ` Alan Cox [this message]
2004-09-13 16:28 ` radeon-pre-2 Jon Smirl
2004-09-13 16:43 ` radeon-pre-2 Alan Cox
2004-09-13 18:11 ` radeon-pre-2 Jon Smirl
2004-09-13 18:49 ` radeon-pre-2 Jesse Barnes
2004-09-13 22:17 ` radeon-pre-2 Antonino A. Daplas
2004-09-13 17:50 ` radeon-pre-2 Jon Smirl
2004-09-14 10:27 ` radeon-pre-2 Alan Cox
2004-09-11 8:38 ` radeon-pre-2 Keith Whitwell
2004-09-10 23:10 ` radeon-pre-2 Jon Smirl
2004-09-10 22:17 ` radeon-pre-2 Alan Cox
2004-09-11 12:27 ` radeon-pre-2 Christoph Hellwig
2004-09-11 12:49 ` radeon-pre-2 Mike Mestnik
2004-09-11 16:45 ` radeon-pre-2 Christoph Hellwig
2004-09-11 16:11 ` radeon-pre-2 Jon Smirl
2004-09-11 16:45 ` radeon-pre-2 Christoph Hellwig
2004-09-11 17:02 ` radeon-pre-2 Linus Torvalds
2004-09-11 16:18 ` radeon-pre-2 Alan Cox
2004-09-11 17:49 ` radeon-pre-2 Linus Torvalds
2004-09-11 17:13 ` radeon-pre-2 Jon Smirl
2004-09-11 16:23 ` radeon-pre-2 Alan Cox
2004-09-11 17:41 ` radeon-pre-2 Linus Torvalds
2004-09-11 17:57 ` radeon-pre-2 Michel Dänzer
2004-09-11 20:29 ` radeon-pre-2 Eric Anholt
2004-09-11 21:41 ` radeon-pre-2 Jon Smirl
2004-09-11 17:54 ` radeon-pre-2 Jon Smirl
2004-09-11 18:13 ` radeon-pre-2 Linus Torvalds
2004-09-11 21:02 ` radeon-pre-2 Jon Smirl
2004-09-11 21:06 ` radeon-pre-2 Christoph Hellwig
2004-09-11 21:37 ` radeon-pre-2 Jon Smirl
2004-09-11 23:23 ` radeon-pre-2 Alan Cox
2004-09-12 7:12 ` radeon-pre-2 Eric Anholt
2004-09-12 0:21 ` radeon-pre-2 Jon Smirl
2004-09-12 0:28 ` radeon-pre-2 Linus Torvalds
2004-09-12 23:53 ` radeon-pre-2 Dave Airlie
2004-09-11 18:17 ` radeon-pre-2 Vladimir Dergachev
2004-09-10 17:12 ` radeon-pre-2 Alan Cox
[not found] ` <1094853894.18235.17.camel@localhost.localdomain>
2004-09-11 2:20 ` radeon-pre-2 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=1095087860.14582.37.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.sourceforge.net \
--cc=fxkuehl@gmx.de \
--cc=jonsmirl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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