On Mon, May 11, 2020 at 10:52 PM Bjorn Andersson <bjorn.andersson@xxxxxxxxxx> wrote: > > On Sat 09 May 06:08 PDT 2020, Shawn Guo wrote: > > > On some SoCs like MSM8939 with A405 adreno, there is a gfx_tbu clock > > needs to be on while doing TLB invalidate. Otherwise, TLBSYNC status > > will not be correctly reflected, causing the system to go into a bad > > state. Add it as an optional clock, so that platforms that have this > > clock can pass it over DT. > > > > Signed-off-by: Shawn Guo <shawn.guo@xxxxxxxxxx> [snip] > > @@ -839,6 +849,12 @@ static int qcom_iommu_device_probe(struct platform_device *pdev) > > return PTR_ERR(qcom_iommu->bus_clk); > > } > > > > + qcom_iommu->tlb_clk = devm_clk_get(dev, "tlb"); > > Wouldn't "tbu" be a better name for this clock? Given that seems the > actually be the hardware block you're clocking. > > > That said, I thought we used device links and pm_runtime to ensure that > the TBUs are powered and clocked... > please don't rely on device-link for that, buffers can be freed (and therefore need to be unmapped) at times when the gpu is off. BR, -R