Re: [PATCH v8 0/5] iommu/arm-smmu: Add runtime pm/sleep support

From: Vivek Gautam
Date: Mon Mar 05 2018 - 12:19:27 EST


Hi Tomasz,


On 3/5/2018 6:55 PM, Tomasz Figa wrote:
Hi Vivek,

On Fri, Mar 2, 2018 at 7:10 PM, Vivek Gautam
<vivek.gautam@xxxxxxxxxxxxxx> wrote:
This series provides the support for turning on the arm-smmu's
clocks/power domains using runtime pm. This is done using the
recently introduced device links patches, which lets the smmu's
runtime to follow the master's runtime pm, so the smmu remains
powered only when the masters use it.

It also adds support for Qcom's arm-smmu-v2 variant that
has different clocks and power requirements.

Took some reference from the exynos runtime patches [1].

After another round of discussion [3], we now finally seem to be
in agreement to add a flag based on compatible, a flag that would
indicate if a particular implementation of arm-smmu supports
runtime pm or not.
This lets us to use the much-argued pm_runtime_get_sync/put_sync()
calls in map/unmap callbacks so that the clients do not have to
worry about handling any of the arm-smmu's power.
The patch that exported couple of pm_runtime suppliers APIS, viz.
pm_runtime_get_suppliers(), and pm_runtime_put_suppliers() can be
dropped since we don't have a user now for these APIs.
Thanks Rafael for reviewing the changes, but looks like we don't
need to export those APIs for some more time. :)

Previous version of this patch series is @ [5].
Thanks for addressing my comments. There is still a bit of space for
improving the granularity of power management, as far as I understood
how it works on SDM845 correctly, but as a first step, this should at
least let things work.

Sure. I will be sending a patch, based on this series, to add 'qcom,smmu-500'
that enables *rpm_suported* flag for us.
We can try to take care of some of the things with that.
Reviewed-by: Tomasz Figa <tfiga@xxxxxxxxxxxx>

Thanks for the review.

regards
Vivek

Best regards,
Tomasz