Skip to content

Commit 8f3eea9

Browse files
committed
drm/etnaviv: keep MMU context across runtime suspend/resume
The MMU state may be kept across a runtime suspend/resume cycle, as we avoid a full hardware reset to keep the latency of the runtime PM small. Don't pretend that the MMU state is lost in driver state. The MMU context is pushed out when new HW jobs with a different context are coming in. The only exception to this is when the GPU is unbound, in which case we need to make sure to also free the last active context. Cc: [email protected] # 5.4 Reported-by: Michael Walle <[email protected]> Signed-off-by: Lucas Stach <[email protected]> Tested-by: Michael Walle <[email protected]> Tested-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
1 parent 23e0f5a commit 8f3eea9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/etnaviv/etnaviv_gpu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,9 +1596,6 @@ static int etnaviv_gpu_hw_suspend(struct etnaviv_gpu *gpu)
15961596
*/
15971597
etnaviv_gpu_wait_idle(gpu, 100);
15981598

1599-
etnaviv_iommu_context_put(gpu->mmu_context);
1600-
gpu->mmu_context = NULL;
1601-
16021599
gpu->fe_running = false;
16031600
}
16041601

@@ -1747,6 +1744,9 @@ static void etnaviv_gpu_unbind(struct device *dev, struct device *master,
17471744
etnaviv_gpu_hw_suspend(gpu);
17481745
#endif
17491746

1747+
if (gpu->mmu_context)
1748+
etnaviv_iommu_context_put(gpu->mmu_context);
1749+
17501750
if (gpu->initialized) {
17511751
etnaviv_cmdbuf_free(&gpu->buffer);
17521752
etnaviv_iommu_global_fini(gpu);

0 commit comments

Comments
 (0)