Re: [PATCH v2 12/13] iommu/rockchip: Add runtime PM support

2018-01-17 Thread JeffyChen
Hi Tomasz, On 01/17/2018 03:52 PM, JeffyChen wrote: Hi Tomasz, On 01/17/2018 03:38 PM, Tomasz Figa wrote: >>Don't we need to check here (and in _shutdown() too) if we have a >>domain attached? > >hmmm, right, the startup might been called by resume, so should check >iommu->domain here. > >but

Re: [PATCH v2 12/13] iommu/rockchip: Add runtime PM support

2018-01-16 Thread JeffyChen
Hi Tomasz, On 01/17/2018 03:38 PM, Tomasz Figa wrote: >>Don't we need to check here (and in _shutdown() too) if we have a >>domain attached? > >hmmm, right, the startup might been called by resume, so should check >iommu->domain here. > >but the shutdown would be called at the end of detach or

Re: [PATCH v2 12/13] iommu/rockchip: Add runtime PM support

2018-01-16 Thread Tomasz Figa
On Wed, Jan 17, 2018 at 4:26 PM, JeffyChen wrote: > Hi Tomasz, > > Thanks for your reply. > > On 01/17/2018 02:20 PM, Tomasz Figa wrote: >> >> On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen >> [snip] >>> >>> +static int rk_iommu_startup(struct rk_iommu *iommu) >>> { >>> - struct rk_iommu *i

Re: [PATCH v2 12/13] iommu/rockchip: Add runtime PM support

2018-01-16 Thread Tomasz Figa
On Tue, Jan 16, 2018 at 10:25 PM, Jeffy Chen wrote: > When the power domain is powered off, the IOMMU cannot be accessed and > register programming must be deferred until the power domain becomes > enabled. > > Add runtime PM support, and use runtime PM device link from IOMMU to > master to startu