Re: [patch 5/8] [Intel IOMMU] Graphics driver workarounds to provide unity map

From: Andi Kleen
Date: Tue Apr 10 2007 - 05:12:56 EST


On Tuesday 10 April 2007 11:07:02 David Miller wrote:
> From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
> Date: Tue, 10 Apr 2007 09:33:51 +0100
>
> > On Mon, Apr 09, 2007 at 02:55:57PM -0700, Ashok Raj wrote:
> > > Most GFX drivers don't call standard PCI DMA APIs to allocate DMA buffer,
> > > Such drivers will be broken with IOMMU enabled. To workaround this issue,
> > > we added two options.
> >
> > All drm drivers do it. If the usual out of tree crap vendors are too
> > stupid for their own sake it's their fault.
> >
> > So NACK to this patch.
>
> That's my feeling as well, everything we care about should be using
> the proper APIs or else what is the point of them...

They can't. There is no proper API to do IOMMU mappings from user space.
And that is how Xorg on x86 works.

I had some hackish patches to enable mapping on /sys/bus/pci/.../coherent_mem, but
you need ioctls to pass out the translated address and it wasn't
exactly pretty. Still also not sure that's the right way.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/