[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210920163938.008762974@linuxfoundation.org>
Date: Mon, 20 Sep 2021 18:43:41 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Lucas Stach <l.stach@...gutronix.de>,
Michael Walle <michael@...le.cc>, Marek Vasut <marex@...x.de>,
Christian Gmeiner <christian.gmeiner@...il.com>
Subject: [PATCH 5.4 203/260] drm/etnaviv: exec and MMU state is lost when resetting the GPU
From: Lucas Stach <l.stach@...gutronix.de>
commit 725cbc7884c37f3b4f1777bc1aea6432cded8ca5 upstream.
When the GPU is reset both the current exec state, as well as all MMU
state is lost. Move the driver side state tracking into the reset function
to keep hardware and software state from diverging.
Cc: stable@...r.kernel.org # 5.4
Signed-off-by: Lucas Stach <l.stach@...gutronix.de>
Tested-by: Michael Walle <michael@...le.cc>
Tested-by: Marek Vasut <marex@...x.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@...il.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -546,6 +546,8 @@ static int etnaviv_hw_reset(struct etnav
etnaviv_gpu_update_clock(gpu);
gpu->fe_running = false;
+ gpu->exec_state = -1;
+ gpu->mmu_context = NULL;
return 0;
}
@@ -794,7 +796,6 @@ int etnaviv_gpu_init(struct etnaviv_gpu
/* Now program the hardware */
mutex_lock(&gpu->lock);
etnaviv_gpu_hw_init(gpu);
- gpu->exec_state = -1;
mutex_unlock(&gpu->lock);
pm_runtime_mark_last_busy(gpu->dev);
@@ -998,8 +999,6 @@ void etnaviv_gpu_recover_hang(struct etn
spin_unlock(&gpu->event_spinlock);
etnaviv_gpu_hw_init(gpu);
- gpu->exec_state = -1;
- gpu->mmu_context = NULL;
mutex_unlock(&gpu->lock);
pm_runtime_mark_last_busy(gpu->dev);
Powered by blists - more mailing lists