All of lore.kernel.org
 help / color / mirror / Atom feed
From: markz <markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Emily Jiang <ejiang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Peer Chen <pchen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org"
	<thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>,
	"iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	Alex Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Ken Adams <KAdams-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: Tegra-DRM: Tegra30: DMA mapping API
Date: Thu, 12 Jul 2012 14:49:05 +0800	[thread overview]
Message-ID: <1342075745.4559.26.camel@markz-desktop> (raw)
In-Reply-To: <20120712063322.df310d0b459d7d7d74511d8e-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On Thu, 2012-07-12 at 11:33 +0800, Hiroshi Doyu wrote:
> On Thu, 12 Jul 2012 05:04:33 +0200
> markz <markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> 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-5C7GfCeVMHo@public.gmane.org> 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

  parent reply	other threads:[~2012-07-12  6:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <23B010BBA481A74B98487467C29BA57BF2366A1010@HKMAIL01.nvidia.com>
     [not found] ` <20120706.092417.916278591811517036.hdoyu@nvidia.com>
     [not found]   ` <23B010BBA481A74B98487467C29BA57BF2366A1012@HKMAIL01.nvidia.com>
     [not found]     ` <23B010BBA481A74B98487467C29BA57BF2366A1012-Q4EWCATADntDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-07-09 15:28       ` Tegra-DRM: Tegra30: DMA mapping API (was: About dma mapping apis) Hiroshi Doyu
     [not found]         ` <20120709.182828.1247752887335819184.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-10  0:47           ` markz
2012-07-10  8:14           ` markz
2012-07-10 10:24             ` Hiroshi Doyu
     [not found]               ` <20120710132417.b52fbc05847cabec7e16cebd-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-10 10:26                 ` Tegra-DRM: Tegra30: DMA mapping API Hiroshi Doyu
     [not found]                   ` <20120710132639.a65ce779fcfabe74435dd6bc-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-11 10:58                     ` Joerg Roedel
     [not found]                       ` <20120711105827.GE25282-5C7GfCeVMHo@public.gmane.org>
2012-07-11 11:42                         ` Hiroshi Doyu
     [not found]                           ` <20120711144254.8f119872445e95713b467448-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-12  3:04                             ` markz
2012-07-12  3:33                               ` Hiroshi Doyu
     [not found]                                 ` <20120712063322.df310d0b459d7d7d74511d8e-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-12  6:49                                   ` markz [this message]
2012-07-12  7:11                                     ` Hiroshi Doyu
     [not found]                                       ` <20120712101125.427c920559044d550f0c64b7-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-07-12  7:19                                         ` markz

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=1342075745.4559.26.camel@markz-desktop \
    --to=markz-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=KAdams-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=ejiang-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pchen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org \
    --cc=wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.