Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-20 Thread Laurent Pinchart
Hi Kevin, On Friday 19 December 2014 03:27:35 Rafael J. Wysocki wrote: > On Thursday, December 18, 2014 11:28:58 PM Laurent Pinchart wrote: > > Hi Kevin, > > [cut] > > It would be better to be able to reference count the DMA engine from > the bus master IMO and arguably you can use the

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-20 Thread Laurent Pinchart
Hi Kevin, On Friday 19 December 2014 03:27:35 Rafael J. Wysocki wrote: On Thursday, December 18, 2014 11:28:58 PM Laurent Pinchart wrote: Hi Kevin, [cut] It would be better to be able to reference count the DMA engine from the bus master IMO and arguably you can use the runtime PM

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-18 Thread Rafael J. Wysocki
On Thursday, December 18, 2014 11:28:58 PM Laurent Pinchart wrote: > Hi Kevin, > [cut] > > >> > > >> It would be better to be able to reference count the DMA engine from the > > >> bus master IMO and arguably you can use the runtime PM framework for > > >> that. Namely, give bus masters

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-18 Thread Laurent Pinchart
Hi Kevin, On Thursday 18 December 2014 13:14:24 Kevin Hilman wrote: > Laurent Pinchart writes: > > On Thursday 18 December 2014 02:32:30 Rafael J. Wysocki wrote: > >> On Wednesday, December 17, 2014 02:15:31 AM Laurent Pinchart wrote: > >>> On Tuesday 16 December 2014 11:18:33 Tomasz Figa wrote:

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-18 Thread Kevin Hilman
Laurent Pinchart writes: > Hi Rafael, > > On Thursday 18 December 2014 02:32:30 Rafael J. Wysocki wrote: >> On Wednesday, December 17, 2014 02:15:31 AM Laurent Pinchart wrote: >> > On Tuesday 16 December 2014 11:18:33 Tomasz Figa wrote: >> >> On Tue, Dec 16, 2014 at 4:53 AM, Laurent Pinchart

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-18 Thread Laurent Pinchart
Hi Rafael, On Thursday 18 December 2014 02:32:30 Rafael J. Wysocki wrote: > On Wednesday, December 17, 2014 02:15:31 AM Laurent Pinchart wrote: > > On Tuesday 16 December 2014 11:18:33 Tomasz Figa wrote: > >> On Tue, Dec 16, 2014 at 4:53 AM, Laurent Pinchart wrote: > >>> On Monday 15 December

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-18 Thread Laurent Pinchart
Hi Rafael, On Thursday 18 December 2014 02:32:30 Rafael J. Wysocki wrote: On Wednesday, December 17, 2014 02:15:31 AM Laurent Pinchart wrote: On Tuesday 16 December 2014 11:18:33 Tomasz Figa wrote: On Tue, Dec 16, 2014 at 4:53 AM, Laurent Pinchart wrote: On Monday 15 December 2014 11:39:01

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-18 Thread Kevin Hilman
Laurent Pinchart laurent.pinch...@ideasonboard.com writes: Hi Rafael, On Thursday 18 December 2014 02:32:30 Rafael J. Wysocki wrote: On Wednesday, December 17, 2014 02:15:31 AM Laurent Pinchart wrote: On Tuesday 16 December 2014 11:18:33 Tomasz Figa wrote: On Tue, Dec 16, 2014 at 4:53 AM,

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-18 Thread Laurent Pinchart
Hi Kevin, On Thursday 18 December 2014 13:14:24 Kevin Hilman wrote: Laurent Pinchart laurent.pinch...@ideasonboard.com writes: On Thursday 18 December 2014 02:32:30 Rafael J. Wysocki wrote: On Wednesday, December 17, 2014 02:15:31 AM Laurent Pinchart wrote: On Tuesday 16 December 2014

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-18 Thread Rafael J. Wysocki
On Thursday, December 18, 2014 11:28:58 PM Laurent Pinchart wrote: Hi Kevin, [cut] It would be better to be able to reference count the DMA engine from the bus master IMO and arguably you can use the runtime PM framework for that. Namely, give bus masters someting like

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-17 Thread Rafael J. Wysocki
On Wednesday, December 17, 2014 02:15:31 AM Laurent Pinchart wrote: > Hi Tomasz, > > On Tuesday 16 December 2014 11:18:33 Tomasz Figa wrote: > > On Tue, Dec 16, 2014 at 4:53 AM, Laurent Pinchart wrote: > > > On Monday 15 December 2014 11:39:01 Tomasz Figa wrote: > > >> On Sat, Dec 13, 2014 at

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-17 Thread Rafael J. Wysocki
On Wednesday, December 17, 2014 02:15:31 AM Laurent Pinchart wrote: Hi Tomasz, On Tuesday 16 December 2014 11:18:33 Tomasz Figa wrote: On Tue, Dec 16, 2014 at 4:53 AM, Laurent Pinchart wrote: On Monday 15 December 2014 11:39:01 Tomasz Figa wrote: On Sat, Dec 13, 2014 at 5:47 AM,

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-16 Thread Laurent Pinchart
Hi Tomasz, On Tuesday 16 December 2014 11:18:33 Tomasz Figa wrote: > On Tue, Dec 16, 2014 at 4:53 AM, Laurent Pinchart wrote: > > On Monday 15 December 2014 11:39:01 Tomasz Figa wrote: > >> On Sat, Dec 13, 2014 at 5:47 AM, Laurent Pinchart wrote: > >>> On Friday 12 December 2014 13:15:51 Tomasz

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-16 Thread Laurent Pinchart
Hi Tomasz, On Tuesday 16 December 2014 11:18:33 Tomasz Figa wrote: On Tue, Dec 16, 2014 at 4:53 AM, Laurent Pinchart wrote: On Monday 15 December 2014 11:39:01 Tomasz Figa wrote: On Sat, Dec 13, 2014 at 5:47 AM, Laurent Pinchart wrote: On Friday 12 December 2014 13:15:51 Tomasz Figa wrote:

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-15 Thread Tomasz Figa
On Tue, Dec 16, 2014 at 4:53 AM, Laurent Pinchart wrote: > Hi Tomasz, > > On Monday 15 December 2014 11:39:01 Tomasz Figa wrote: >> On Sat, Dec 13, 2014 at 5:47 AM, Laurent Pinchart wrote: >> > On Friday 12 December 2014 13:15:51 Tomasz Figa wrote: >> >> On Fri, Dec 12, 2014 at 5:48 AM, Rafael J.

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-15 Thread Laurent Pinchart
Hi Tomasz, On Monday 15 December 2014 11:39:01 Tomasz Figa wrote: > On Sat, Dec 13, 2014 at 5:47 AM, Laurent Pinchart wrote: > > On Friday 12 December 2014 13:15:51 Tomasz Figa wrote: > >> On Fri, Dec 12, 2014 at 5:48 AM, Rafael J. Wysocki wrote: > >>> On Thursday, December 11, 2014 04:51:37 PM

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-15 Thread Kevin Hilman
Geert Uytterhoeven writes: > On Fri, Dec 12, 2014 at 9:04 PM, Kevin Hilman wrote: >> An even more exciting problem exists when a CPU is in the same domain as >> other peripherals, those peripherals are all idle and the power domain >> is gated. :) > > We do have pm_genpd_attach_cpuidle() and

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-15 Thread Geert Uytterhoeven
On Fri, Dec 12, 2014 at 9:04 PM, Kevin Hilman wrote: > An even more exciting problem exists when a CPU is in the same domain as > other peripherals, those peripherals are all idle and the power domain > is gated. :) We do have pm_genpd_attach_cpuidle() and pm_genpd_name_attach_cpuidle()?

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-15 Thread Geert Uytterhoeven
On Fri, Dec 12, 2014 at 9:04 PM, Kevin Hilman khil...@kernel.org wrote: An even more exciting problem exists when a CPU is in the same domain as other peripherals, those peripherals are all idle and the power domain is gated. :) We do have pm_genpd_attach_cpuidle() and

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-15 Thread Kevin Hilman
Geert Uytterhoeven ge...@linux-m68k.org writes: On Fri, Dec 12, 2014 at 9:04 PM, Kevin Hilman khil...@kernel.org wrote: An even more exciting problem exists when a CPU is in the same domain as other peripherals, those peripherals are all idle and the power domain is gated. :) We do have

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-15 Thread Laurent Pinchart
Hi Tomasz, On Monday 15 December 2014 11:39:01 Tomasz Figa wrote: On Sat, Dec 13, 2014 at 5:47 AM, Laurent Pinchart wrote: On Friday 12 December 2014 13:15:51 Tomasz Figa wrote: On Fri, Dec 12, 2014 at 5:48 AM, Rafael J. Wysocki wrote: On Thursday, December 11, 2014 04:51:37 PM Ulf Hansson

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-15 Thread Tomasz Figa
On Tue, Dec 16, 2014 at 4:53 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Tomasz, On Monday 15 December 2014 11:39:01 Tomasz Figa wrote: On Sat, Dec 13, 2014 at 5:47 AM, Laurent Pinchart wrote: On Friday 12 December 2014 13:15:51 Tomasz Figa wrote: On Fri, Dec 12, 2014

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-14 Thread Tomasz Figa
On Sat, Dec 13, 2014 at 5:04 AM, Kevin Hilman wrote: > Tomasz Figa writes: > > [...] > >> We have a power domain, which contains an IOMMU and an IP block, which >> can do bus transactions through that IOMMU. Of course the IP block is >> not aware of the IOMMU, because this is just an integration

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-14 Thread Tomasz Figa
On Sat, Dec 13, 2014 at 5:47 AM, Laurent Pinchart wrote: > Hello, > > On Friday 12 December 2014 13:15:51 Tomasz Figa wrote: >> On Fri, Dec 12, 2014 at 5:48 AM, Rafael J. Wysocki wrote: >> > On Thursday, December 11, 2014 04:51:37 PM Ulf Hansson wrote: >> >> On 11 December 2014 at 16:31, Kevin

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-14 Thread Tomasz Figa
On Sat, Dec 13, 2014 at 5:47 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hello, On Friday 12 December 2014 13:15:51 Tomasz Figa wrote: On Fri, Dec 12, 2014 at 5:48 AM, Rafael J. Wysocki wrote: On Thursday, December 11, 2014 04:51:37 PM Ulf Hansson wrote: On 11 December

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-14 Thread Tomasz Figa
On Sat, Dec 13, 2014 at 5:04 AM, Kevin Hilman khil...@kernel.org wrote: Tomasz Figa tf...@chromium.org writes: [...] We have a power domain, which contains an IOMMU and an IP block, which can do bus transactions through that IOMMU. Of course the IP block is not aware of the IOMMU, because

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-12 Thread Laurent Pinchart
Hello, On Friday 12 December 2014 13:15:51 Tomasz Figa wrote: > On Fri, Dec 12, 2014 at 5:48 AM, Rafael J. Wysocki wrote: > > On Thursday, December 11, 2014 04:51:37 PM Ulf Hansson wrote: > >> On 11 December 2014 at 16:31, Kevin Hilman wrote: > >> > [+ Laurent Pinchart] > >> > > >> > Tomasz

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-12 Thread Kevin Hilman
Tomasz Figa writes: [...] > We have a power domain, which contains an IOMMU and an IP block, which > can do bus transactions through that IOMMU. Of course the IP block is > not aware of the IOMMU, because this is just an integration detail and > on other platforms using the same IP block the

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-12 Thread Kevin Hilman
Tomasz Figa tf...@chromium.org writes: [...] We have a power domain, which contains an IOMMU and an IP block, which can do bus transactions through that IOMMU. Of course the IP block is not aware of the IOMMU, because this is just an integration detail and on other platforms using the same

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-12 Thread Laurent Pinchart
Hello, On Friday 12 December 2014 13:15:51 Tomasz Figa wrote: On Fri, Dec 12, 2014 at 5:48 AM, Rafael J. Wysocki wrote: On Thursday, December 11, 2014 04:51:37 PM Ulf Hansson wrote: On 11 December 2014 at 16:31, Kevin Hilman khil...@kernel.org wrote: [+ Laurent Pinchart] Tomasz

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Tomasz Figa
Hi Rafael, On Fri, Dec 12, 2014 at 5:48 AM, Rafael J. Wysocki wrote: > On Thursday, December 11, 2014 04:51:37 PM Ulf Hansson wrote: >> On 11 December 2014 at 16:31, Kevin Hilman wrote: >> > [+ Laurent Pinchart] >> > >> > Tomasz Figa writes: >> > >> >> On Thu, Dec 11, 2014 at 8:58 PM, Ulf

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Rafael J. Wysocki
On Thursday, December 11, 2014 04:51:37 PM Ulf Hansson wrote: > On 11 December 2014 at 16:31, Kevin Hilman wrote: > > [+ Laurent Pinchart] > > > > Tomasz Figa writes: > > > >> On Thu, Dec 11, 2014 at 8:58 PM, Ulf Hansson > >> wrote: > > > > [...] > > > @@ -988,11 +1107,28 @@ static int

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Ulf Hansson
On 11 December 2014 at 16:31, Kevin Hilman wrote: > [+ Laurent Pinchart] > > Tomasz Figa writes: > >> On Thu, Dec 11, 2014 at 8:58 PM, Ulf Hansson wrote: > > [...] > @@ -988,11 +1107,28 @@ static int rk_iommu_probe(struct platform_device *pdev) return -ENXIO;

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Kevin Hilman
[+ Laurent Pinchart] Tomasz Figa writes: > On Thu, Dec 11, 2014 at 8:58 PM, Ulf Hansson wrote: [...] >>> @@ -988,11 +1107,28 @@ static int rk_iommu_probe(struct platform_device >>> *pdev) >>> return -ENXIO; >>> } >>> >>> + pm_runtime_no_callbacks(dev); >>> +

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Ulf Hansson
On 11 December 2014 at 13:42, Tomasz Figa wrote: > Hi Ulf, > > On Thu, Dec 11, 2014 at 8:58 PM, Ulf Hansson wrote: >> On 11 December 2014 at 09:26, Tomasz Figa wrote: >>> This patch modifies the rockchip-iommu driver to consider state of >>> the power domain the IOMMU is located in. When the

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Tomasz Figa
Hi Ulf, On Thu, Dec 11, 2014 at 8:58 PM, Ulf Hansson wrote: > On 11 December 2014 at 09:26, Tomasz Figa wrote: >> This patch modifies the rockchip-iommu driver to consider state of >> the power domain the IOMMU is located in. When the power domain >> is powered off, the IOMMU cannot be accessed

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Ulf Hansson
On 11 December 2014 at 09:26, Tomasz Figa wrote: > This patch modifies the rockchip-iommu driver to consider state of > the power domain the IOMMU is located in. When the power domain > is powered off, the IOMMU cannot be accessed and register programming > must be deferred until the power domain

[RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Tomasz Figa
This patch modifies the rockchip-iommu driver to consider state of the power domain the IOMMU is located in. When the power domain is powered off, the IOMMU cannot be accessed and register programming must be deferred until the power domain becomes enabled. The solution implemented in this patch

[RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Tomasz Figa
This patch modifies the rockchip-iommu driver to consider state of the power domain the IOMMU is located in. When the power domain is powered off, the IOMMU cannot be accessed and register programming must be deferred until the power domain becomes enabled. The solution implemented in this patch

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Ulf Hansson
On 11 December 2014 at 09:26, Tomasz Figa tf...@chromium.org wrote: This patch modifies the rockchip-iommu driver to consider state of the power domain the IOMMU is located in. When the power domain is powered off, the IOMMU cannot be accessed and register programming must be deferred until

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Tomasz Figa
Hi Ulf, On Thu, Dec 11, 2014 at 8:58 PM, Ulf Hansson ulf.hans...@linaro.org wrote: On 11 December 2014 at 09:26, Tomasz Figa tf...@chromium.org wrote: This patch modifies the rockchip-iommu driver to consider state of the power domain the IOMMU is located in. When the power domain is powered

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Ulf Hansson
On 11 December 2014 at 13:42, Tomasz Figa tf...@chromium.org wrote: Hi Ulf, On Thu, Dec 11, 2014 at 8:58 PM, Ulf Hansson ulf.hans...@linaro.org wrote: On 11 December 2014 at 09:26, Tomasz Figa tf...@chromium.org wrote: This patch modifies the rockchip-iommu driver to consider state of the

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Kevin Hilman
[+ Laurent Pinchart] Tomasz Figa tf...@chromium.org writes: On Thu, Dec 11, 2014 at 8:58 PM, Ulf Hansson ulf.hans...@linaro.org wrote: [...] @@ -988,11 +1107,28 @@ static int rk_iommu_probe(struct platform_device *pdev) return -ENXIO; } +

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Ulf Hansson
On 11 December 2014 at 16:31, Kevin Hilman khil...@kernel.org wrote: [+ Laurent Pinchart] Tomasz Figa tf...@chromium.org writes: On Thu, Dec 11, 2014 at 8:58 PM, Ulf Hansson ulf.hans...@linaro.org wrote: [...] @@ -988,11 +1107,28 @@ static int rk_iommu_probe(struct platform_device

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Rafael J. Wysocki
On Thursday, December 11, 2014 04:51:37 PM Ulf Hansson wrote: On 11 December 2014 at 16:31, Kevin Hilman khil...@kernel.org wrote: [+ Laurent Pinchart] Tomasz Figa tf...@chromium.org writes: On Thu, Dec 11, 2014 at 8:58 PM, Ulf Hansson ulf.hans...@linaro.org wrote: [...] @@

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-11 Thread Tomasz Figa
Hi Rafael, On Fri, Dec 12, 2014 at 5:48 AM, Rafael J. Wysocki r...@rjwysocki.net wrote: On Thursday, December 11, 2014 04:51:37 PM Ulf Hansson wrote: On 11 December 2014 at 16:31, Kevin Hilman khil...@kernel.org wrote: [+ Laurent Pinchart] Tomasz Figa tf...@chromium.org writes: On