From cbb4cf8bdffd943fa7cff724232b57b0e6891095 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 21 Jul 2014 11:59:44 +0200 Subject: [PATCH] drm/nouveau/perfmon: do not forget to destroy the engine context This fixes a crash when we reload Nouveau DRM. Signed-off-by: Samuel Pitoiset Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/core/engine/perfmon/base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/nouveau/core/engine/perfmon/base.c b/drivers/gpu/drm/nouveau/core/engine/perfmon/base.c index e9c5e51943ef..748100307bb6 100644 --- a/drivers/gpu/drm/nouveau/core/engine/perfmon/base.c +++ b/drivers/gpu/drm/nouveau/core/engine/perfmon/base.c @@ -303,6 +303,7 @@ nouveau_perfctx_dtor(struct nouveau_object *object) { struct nouveau_perfmon *ppm = (void *)object->engine; mutex_lock(&nv_subdev(ppm)->mutex); + nouveau_engctx_destroy(&ppm->context->base); ppm->context = NULL; mutex_unlock(&nv_subdev(ppm)->mutex); } -- 2.20.1