Re: Tegra-DRM: Tegra30: DMA mapping API |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: Tegra-DRM: Tegra30: DMA mapping API
- From: markz <markz@xxxxxxxxxx>
- Date: Thu, 12 Jul 2012 14:49:05 +0800
- Cc: Joerg Roedel <joerg.roedel@xxxxxxx>, Lucas Stach <dev@xxxxxxxxxx>, "iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx" <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, "Peer Chen" <pchen@xxxxxxxxxx>, Wei Ni <wni@xxxxxxxxxx>, Emily Jiang <ejiang@xxxxxxxxxx>, Alex Courbot <acourbot@xxxxxxxxxx>, "thierry.reding@xxxxxxxxxxxxxxxxx" <thierry.reding@xxxxxxxxxxxxxxxxx>, "Ken Adams" <KAdams@xxxxxxxxxx>, "linux-tegra@xxxxxxxxxxxxxxx" <linux-tegra@xxxxxxxxxxxxxxx>
- In-reply-to: <20120712063322.df310d0b459d7d7d74511d8e@nvidia.com>
- Organization: nvidia
- Reply-to: <markz@xxxxxxxxxx>
On Thu, 2012-07-12 at 11:33 +0800, Hiroshi Doyu wrote:
> On Thu, 12 Jul 2012 05:04:33 +0200
> markz <markz@xxxxxxxxxx> wrote:
>
> > On Wed, 2012-07-11 at 19:42 +0800, Hiroshi Doyu wrote:
> > > Hi Joerg,
> > >
> > > On Wed, 11 Jul 2012 12:58:27 +0200
> > > Joerg Roedel <joerg.roedel@xxxxxxx> wrote:
> > >
> > > > Hi,
> > > >
> > > > On Tue, Jul 10, 2012 at 01:26:39PM +0300, Hiroshi Doyu wrote:
> > > > > > http://lists.linuxfoundation.org/pipermail/iommu/2012-January/003531.html
> > > > >
> > > > > Do you have any plan to merge the above "IOMMU: Make IOMMU-API ready
> > > > > for GART-like hardware"?
> > > > >
> > > > > Tegra DRM seems to need that feature eventually.
> > > >
> > > > I just rebased and updated the patch-set. A new version is sent out. If
> > > > no major objections come up I queue it for the next merge window.
> > >
> > > Thank you for your prompt action. This would help us a lot.
> >
> > That's great. So Hiroshi-san, about your patch:
> > http://lists.linuxfoundation.org/pipermail/iommu/2012-January/003531.html
> > , what is your plan to merge this?
>
> That's also under review along with the framework as below:
>
> [PATCH 6/7] iommu/tegra: Implement DOMAIN_ATTR_GEOMETRY attribute
> http://lists.linuxfoundation.org/pipermail/iommu/2012-July/004432.html
>
> > After Joerg's patch and yours are merged into linux-next, I can submit
> > my drm patch into review process.
>
> You can also send them now for early review with some note mentioning
> that your patches depend on the above "[PATCH 6/7] iommu/tegra:
> Implement DOMAIN_ATTR_GEOMETRY attribute" in the commit log.
Thank you. I merged this patch set locally but seems it has problems:
The requirement of the drm driver is: It needs a parameter named "base"
while calling function "arm_iommu_create_mapping" to reserve a block of
iova from GART/SMMU.
This patch set defines function "iommu_domain_get_attr" &
"iommu_domain_set_attr", but drm driver can't use them:
1. These 2 functions need a iommu_domain param which means the
iommu_domain should be created before calling them. But the iommu_domain
is created in function "arm_iommu_create_mapping".
2. It's not a good practice to make drm driver calls iommu apis
directly.
Actually, I'm curious that why function "arm_iommu_create_mapping" needs
this "base" param. AIUI, drm driver just needs to tell IOMMU the size of
the iova address to reserve, then the base address can be checked out in
a lot of ways. For example:
1. Via "dma_map_sg" interface -- dma_map_sg defines we can check out the
mapped iova address from "dma_address" member in scatterlist structure.
2. Use this iommu get/set attr interface. Of course, we need some dma
mapping api wrappers on them.
Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[ARM Kernel]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]