• Rob Clark's avatar
    iommu/arm-smmu: Avoid pathological RPM behaviour for unmaps · ee9bdfed
    Rob Clark authored
    When games, browser, or anything using a lot of GPU buffers exits, there
    can be many hundreds or thousands of buffers to unmap and free.  If the
    GPU is otherwise suspended, this can cause arm-smmu to resume/suspend
    for each buffer, resulting 5-10 seconds worth of reprogramming the
    context bank (arm_smmu_write_context_bank()/arm_smmu_write_s2cr()/etc).
    To the user it would appear that the system just locked up.
    
    A simple solution is to use pm_runtime_put_autosuspend() instead, so we
    don't immediately suspend the SMMU device.
    Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
    Signed-off-by: default avatarWill Deacon <will@kernel.org>
    ee9bdfed
arm-smmu.c 61.2 KB