]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/etnaviv: fix crash in GPU suspend when init failed due to buffer placement
authorLucas Stach <l.stach@pengutronix.de>
Mon, 23 Jul 2018 12:27:23 +0000 (14:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Sep 2018 07:46:55 +0000 (09:46 +0200)
[ Upstream commit 5b147465532365dc4e2fee8499d6ca1f52dd0d16 ]

When the suballocator was unable to provide a suitable buffer for the MMUv1
linear window, we roll back the GPU initialization. As the GPU is runtime
resumed at that point we need to clear the kernel cmdbuf suballoc entry to
properly skip any attempt to manipulate the cmdbuf when the GPU gets shut
down in the runtime suspend later on.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/etnaviv/etnaviv_gpu.c

index 686f6552db48d927f4b00f82576dc6c0e037837e..3ef440b235e5b91fe5d207fcd46c31d6b6dd8132 100644 (file)
@@ -799,6 +799,7 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 
 free_buffer:
        etnaviv_cmdbuf_free(&gpu->buffer);
+       gpu->buffer.suballoc = NULL;
 destroy_iommu:
        etnaviv_iommu_destroy(gpu->mmu);
        gpu->mmu = NULL;