drm/nouveau/perfmon: do not forget to destroy the engine context
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 21 Jul 2014 09:59:44 +0000 (11:59 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Sat, 9 Aug 2014 19:11:11 +0000 (05:11 +1000)
This fixes a crash when we reload Nouveau DRM.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/engine/perfmon/base.c

index e9c5e51..7481003 100644 (file)
@@ -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);
 }