From: Dave Airlie <airlied@redhat.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: airlied@linux.ie, tglx@linutronix.de, hpa@zytor.com,
linux-kernel@vger.kernel.org, konrad@kernel.org,
Jeremy Fitzhardinge <jeremy@goop.org>
Subject: Re: [RFC PATCH] Utilize the PCI API in the AGP framework.
Date: Tue, 07 Dec 2010 11:16:49 +1000 [thread overview]
Message-ID: <1291684609.8232.8.camel@clockmaker-el6> (raw)
In-Reply-To: <20101207004844.GA31478@dumpdata.com>
On Mon, 2010-12-06 at 19:48 -0500, Konrad Rzeszutek Wilk wrote:
> On Tue, Dec 07, 2010 at 10:02:06AM +1000, Dave Airlie wrote:
> > On Mon, 2010-12-06 at 18:24 -0500, Konrad Rzeszutek Wilk wrote:
> > > Attached is a set of RFC patches that make it possible for AGP graphic drivers to
> > > work under Xen. The major problem that Linux kernel has when running under Xen
> > > is that the usage of "virt_to_phys(x) >> PAGE_SIZE" to get the DMA address is not
> > > applicable. That is due to the fact that the PFN value is not the real Machine
> > > Frame Number (MFN), hence virt_to_phys(x) >> PAGE_SIZE ends up pointing to a
> > > random physical address. But if you use the PCI API, then the DMA (bus) address
> > > returned is a valid MFN.
> >
> > Can I ask you to go back a step and address what the use case for all of
> > this is, the patch description doesn't address why anyone cares about
> > AGP in 2010, esp with Xen. Virtualising hw drivers for the sake of it
> > is all well and good, but since most of these drivers are for really
> > legacy systems I can't imagine we are going to see a lot of regression
> > testing before they hit distros like Debian two years from now, though
> > maybe Gentoo might pick up some, (is anyone even running IA64?).
>
> Hey Dave,
> Thank you for you quick reply and brief look at the code. When I wrote
> this code a similar thought went through my head, and around that
> time three bugs from Debian (#601341, #602418 and #604096) asked what
> is the the status of making AGP work with Xen. I've asked the folks
> on the bugs to provide input on your question. In regards to regressions
> I've a lot of these machines so I can definitly test them for
> regressions (my thought was to run the OpenArena, TuxRace, and watch
> some flash - is that a good enough test or should I expand it?)
> But obviously I don't have all of them so yeah something might break.
Okay reading that I'm not sure you've started at the right end.
I just read 601341, and it concerns nouveau, which shouldn't on the hw
described be touching AGP at all. Its a PCIE machine, so the DRM/TTM
code won't use any of the AGP paths.
Now if we have fixes for TTM/nouveau/radeon that make it work under Xen
then that is a whole different story, however these patches are not
those.
I'd suggest you reverse the priority, of the comment
a) Fix the GART/AGP backend (so drivers/char/agp/*.c) so they use the
PCI API.
Only the i915 and higher are using the PCI API and I've some of the older
boxes with i860 so can actually test it.
b) Fix the TTM to use the DMA API.
c) Lastly, get rid of _PAGE_IOMAP so we don't have to depend on radeon/nouveau/etc
to set the proper _PAGE_IOMAP on the PFNs/BARs..
to do c, then b, and finally figure out if anyone cares about a, unless there is a major dependency in the code that requires this ordering.
Dave.
next prev parent reply other threads:[~2010-12-07 1:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-06 23:24 [RFC PATCH] Utilize the PCI API in the AGP framework Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 01/23] agp: Add bridge argument to [free|alloc]_gatt_pages macro Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 02/23] agp: Add dma_addr array in struct agp_memory Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 03/23] agp: Introduce two new macros: _agp_[alloc|free]_page Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 04/23] agp: Make agp_generic_[alloc|destroy]_pages use the _agp_[alloc|free]_page macro Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 05/23] agp: Make agp_generic_[alloc|destroy]_page use " Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 06/23] agp/ali: Use the dma_addr instead of page_to_phys for m1541_[alloc|destroy]_page Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 07/23] agp/nvidia: Use the dma_addr[] instead of page_to_phys when inserting Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 08/23] agp/amd64: Use the dma_addr[] and gatt_bus_addr instead of [page|virt]_to_phys respectivly Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 09/23] agp/amd-k7: Utilize the PCI API for creating/inserting pages Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 10/23] ati/agp: " Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 11/23] agp/serverworks: Utilize the PCI API for allocating/inserting pages Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 12/23] agp/intel-gtt: Utilize the PCI DMA for i8xxx, Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 13/23] ia64/agp/zx1: Use PCI API for inserting pages in HP's ZX1 AGP device Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 14/23] ia64/agp/i460: Use PCI API for inserting pages in DIG (non-VT-d) platforms Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 15/23] agp: Make agp_generic_insert_memory use the mem->dma_addr[i] Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 16/23] agp: save the size of GATT table Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 17/23] agp: Make agp_generic_[create|free]_gatt_table be aware of PCI API Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 18/23] agp/x86: Make agp_generic_* use " Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 19/23] ia64/sgi: fix compile error Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 20/23] ia64: Add DMA_ERROR_CODE define Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 21/23] agp/sgi: Use PCI API for inserting/creating pages on SGI Altix Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 22/23] ia64/agp: Make agp_generic_* use PCI API Konrad Rzeszutek Wilk
2010-12-06 23:24 ` [PATCH 23/23] agp/generic: Set the dma_addr[i] to DMA_ERROR_CODE Konrad Rzeszutek Wilk
2010-12-07 0:02 ` [RFC PATCH] Utilize the PCI API in the AGP framework Dave Airlie
2010-12-07 0:48 ` Konrad Rzeszutek Wilk
2010-12-07 1:16 ` Dave Airlie [this message]
2010-12-07 2:12 ` Konrad Rzeszutek Wilk
2010-12-08 16:45 ` Konrad Rzeszutek Wilk
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=1291684609.8232.8.camel@clockmaker-el6 \
--to=airlied@redhat.com \
--cc=airlied@linux.ie \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--cc=konrad@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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