[PATCH RFC 058/111] staging: etnaviv: safely take down hangcheck
Lucas Stach
l.stach at pengutronix.de
Thu Apr 2 08:30:00 PDT 2015
From: Russell King <rmk+kernel at arm.linux.org.uk>
We need to synchronously take down the hangcheck timer, and then cancel
the recovery work when we're unbinding the GPU to avoid these timers and
workers running after we clean up.
Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
---
drivers/staging/etnaviv/etnaviv_gpu.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etnaviv/etnaviv_gpu.c
index a5a47f34eba5..0547e93972e6 100644
--- a/drivers/staging/etnaviv/etnaviv_gpu.c
+++ b/drivers/staging/etnaviv/etnaviv_gpu.c
@@ -932,10 +932,12 @@ static void etnaviv_gpu_unbind(struct device *dev, struct device *master,
{
struct etnaviv_gpu *gpu = dev_get_drvdata(dev);
- del_timer(&gpu->hangcheck_timer);
-
DBG("%s", dev_name(gpu->dev));
+ /* Safely take down hangcheck */
+ del_timer_sync(&gpu->hangcheck_timer);
+ cancel_work_sync(&gpu->recover_work);
+
WARN_ON(!list_empty(&gpu->active_list));
if (gpu->buffer)
--
2.1.4
More information about the dri-devel
mailing list