Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm nouveau: ashes to ashes, dust...
details: https://anonhg.NetBSD.org/src/rev/3f0db7caa907
branches: trunk
changeset: 1028644:3f0db7caa907
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:34:44 2021 +0000
description:
nouveau: ashes to ashes, dust to dust, mutex inited must later destruct
diffstat:
sys/external/bsd/drm2/dist/drm/drm_atomic.c | 9 +++++-
sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c | 5 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bios.c | 8 +++++-
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_dmem.c | 6 +++-
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c | 9 +++++-
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c | 5 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_svm.c | 6 +++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_client.c | 5 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_engine.c | 5 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_subdev.c | 7 ++++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/disp/nouveau_nvkm_engine_disp_dp.c | 5 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/fifo/nouveau_nvkm_engine_fifo_base.c | 5 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/gr/nouveau_nvkm_engine_gr_gf100.c | 6 +++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/gr/nouveau_nvkm_engine_gr_nv04.c | 12 ++++++++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/gr/nouveau_nvkm_engine_gr_nv10.c | 12 ++++++++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/gr/nouveau_nvkm_engine_gr_nv50.c | 12 ++++++++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/falcon/nouveau_nvkm_falcon_base.c | 6 +++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/falcon/nouveau_nvkm_falcon_cmdq.c | 6 +++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/falcon/nouveau_nvkm_falcon_msgq.c | 5 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/falcon/nouveau_nvkm_falcon_qmgr.c | 5 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bar/nouveau_nvkm_subdev_bar_base.c | 5 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/fuse/nouveau_nvkm_subdev_fuse_base.c | 5 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_base.c | 5 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_gk20a.c | 6 +++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mc/nouveau_nvkm_subdev_mc_base.c | 7 ++++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mc/nouveau_nvkm_subdev_mc_gp100.c | 12 ++++++++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mc/priv.h | 3 +-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mmu/nouveau_nvkm_subdev_mmu_vmm.c | 6 +++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/therm/nouveau_nvkm_subdev_therm_base.c | 7 ++++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/therm/nouveau_nvkm_subdev_therm_fan.c | 12 ++++++++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/therm/nouveau_nvkm_subdev_therm_fantog.c | 12 ++++++++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/therm/priv.h | 4 ++-
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/timer/nouveau_nvkm_subdev_timer_base.c | 5 ++-
33 files changed, 164 insertions(+), 64 deletions(-)
diffs (truncated from 966 to 300 lines):
diff -r df2c82e0a7b4 -r 3f0db7caa907 sys/external/bsd/drm2/dist/drm/drm_atomic.c
--- a/sys/external/bsd/drm2/dist/drm/drm_atomic.c Sun Dec 19 11:34:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_atomic.c Sun Dec 19 11:34:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_atomic.c,v 1.11 2021/12/19 00:55:34 riastradh Exp $ */
+/* $NetBSD: drm_atomic.c,v 1.12 2021/12/19 11:34:44 riastradh Exp $ */
/*
* Copyright (C) 2014 Red Hat
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_atomic.c,v 1.11 2021/12/19 00:55:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_atomic.c,v 1.12 2021/12/19 11:34:44 riastradh Exp $");
#include <linux/sync_file.h>
@@ -52,6 +52,11 @@
struct drm_crtc_commit *commit =
container_of(kref, struct drm_crtc_commit, ref);
+#ifdef __NetBSD__
+ destroy_completion(&commit->flip_done);
+ destroy_completion(&commit->hw_done);
+ destroy_completion(&commit->cleanup_done);
+#endif
kfree(commit);
}
EXPORT_SYMBOL(__drm_crtc_commit_free);
diff -r df2c82e0a7b4 -r 3f0db7caa907 sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c Sun Dec 19 11:34:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/dispnv50/nouveau_dispnv50_disp.c Sun Dec 19 11:34:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_dispnv50_disp.c,v 1.5 2021/12/19 10:49:47 riastradh Exp $ */
+/* $NetBSD: nouveau_dispnv50_disp.c,v 1.6 2021/12/19 11:34:44 riastradh Exp $ */
/*
* Copyright 2011 Red Hat Inc.
@@ -24,7 +24,7 @@
* Authors: Ben Skeggs
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_disp.c,v 1.5 2021/12/19 10:49:47 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_dispnv50_disp.c,v 1.6 2021/12/19 11:34:44 riastradh Exp $");
#include "disp.h"
#include "atom.h"
@@ -2455,6 +2455,7 @@
nouveau_bo_ref(NULL, &disp->sync);
nouveau_display(dev)->priv = NULL;
+ mutex_destroy(&disp->mutex);
kfree(disp);
}
diff -r df2c82e0a7b4 -r 3f0db7caa907 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bios.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bios.c Sun Dec 19 11:34:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bios.c Sun Dec 19 11:34:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_bios.c,v 1.5 2021/12/18 23:45:32 riastradh Exp $ */
+/* $NetBSD: nouveau_bios.c,v 1.6 2021/12/19 11:34:44 riastradh Exp $ */
/*
* Copyright 2005-2006 Erik Waling
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_bios.c,v 1.5 2021/12/18 23:45:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_bios.c,v 1.6 2021/12/19 11:34:44 riastradh Exp $");
#include "nouveau_drv.h"
#include "nouveau_reg.h"
@@ -2132,4 +2132,8 @@
void
nouveau_bios_takedown(struct drm_device *dev)
{
+ struct nouveau_drm *drm = nouveau_drm(dev);
+ struct nvbios *legacy = &drm->vbios;
+
+ spin_lock_destroy(&legacy->lock);
}
diff -r df2c82e0a7b4 -r 3f0db7caa907 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_dmem.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_dmem.c Sun Dec 19 11:34:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_dmem.c Sun Dec 19 11:34:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_dmem.c,v 1.2 2021/12/18 23:45:32 riastradh Exp $ */
+/* $NetBSD: nouveau_dmem.c,v 1.3 2021/12/19 11:34:44 riastradh Exp $ */
/*
* Copyright 2018 Red Hat Inc.
@@ -22,7 +22,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_dmem.c,v 1.2 2021/12/18 23:45:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_dmem.c,v 1.3 2021/12/19 11:34:44 riastradh Exp $");
#include "nouveau_dmem.h"
#include "nouveau_drv.h"
@@ -409,6 +409,7 @@
nouveau_bo_ref(NULL, &chunk->bo);
}
list_del(&chunk->list);
+ spin_lock_destroy(&chunk->lock);
kfree(chunk);
}
@@ -558,6 +559,7 @@
NV_INFO(drm, "DMEM: registered %ldMB of device memory\n", size >> 20);
return;
out_free:
+ mutex_destroy(&drm->dmem->mutex);
kfree(drm->dmem);
drm->dmem = NULL;
}
diff -r df2c82e0a7b4 -r 3f0db7caa907 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c Sun Dec 19 11:34:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c Sun Dec 19 11:34:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_drm.c,v 1.22 2021/12/19 10:51:56 riastradh Exp $ */
+/* $NetBSD: nouveau_drm.c,v 1.23 2021/12/19 11:34:44 riastradh Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_drm.c,v 1.22 2021/12/19 10:51:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_drm.c,v 1.23 2021/12/19 11:34:44 riastradh Exp $");
#include <linux/console.h>
#include <linux/delay.h>
@@ -203,6 +203,8 @@
mutex_lock(&cli->drm->master.lock);
nvif_client_fini(&cli->base);
mutex_unlock(&cli->drm->master.lock);
+ mutex_destroy(&cli->lock);
+ mutex_destroy(&cli->mutex);
}
static int
@@ -610,6 +612,7 @@
nouveau_ttm_fini(drm);
fail_ttm:
nouveau_vga_fini(drm);
+ spin_lock_destroy(&drm->tile.lock);
nouveau_cli_fini(&drm->client);
fail_master:
nouveau_cli_fini(&drm->master);
@@ -645,6 +648,8 @@
nouveau_ttm_fini(drm);
nouveau_vga_fini(drm);
+ spin_lock_destroy(&drm->tile.lock);
+
nouveau_cli_fini(&drm->client);
nouveau_cli_fini(&drm->master);
kfree(drm);
diff -r df2c82e0a7b4 -r 3f0db7caa907 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c Sun Dec 19 11:34:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fbcon.c Sun Dec 19 11:34:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_fbcon.c,v 1.14 2021/12/19 10:51:56 riastradh Exp $ */
+/* $NetBSD: nouveau_fbcon.c,v 1.15 2021/12/19 11:34:44 riastradh Exp $ */
/*
* Copyright © 2007 David Airlie
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_fbcon.c,v 1.14 2021/12/19 10:51:56 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_fbcon.c,v 1.15 2021/12/19 11:34:44 riastradh Exp $");
#include <linux/module.h>
#include <linux/kernel.h>
@@ -679,6 +679,7 @@
nouveau_fbcon_accel_fini(dev);
nouveau_fbcon_destroy(dev, drm->fbcon);
+ mutex_destroy(&drm->fbcon->hotplug_lock);
kfree(drm->fbcon);
drm->fbcon = NULL;
}
diff -r df2c82e0a7b4 -r 3f0db7caa907 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_svm.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_svm.c Sun Dec 19 11:34:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_svm.c Sun Dec 19 11:34:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_svm.c,v 1.2 2021/12/18 23:45:32 riastradh Exp $ */
+/* $NetBSD: nouveau_svm.c,v 1.3 2021/12/19 11:34:44 riastradh Exp $ */
/*
* Copyright 2018 Red Hat Inc.
@@ -22,7 +22,7 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_svm.c,v 1.2 2021/12/18 23:45:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_svm.c,v 1.3 2021/12/19 11:34:44 riastradh Exp $");
#include "nouveau_svm.h"
#include "nouveau_drv.h"
@@ -305,6 +305,7 @@
svmm->vmm = NULL;
mutex_unlock(&svmm->mutex);
mmu_notifier_put(&svmm->notifier);
+ mutex_destroy(&svmm->mutex);
*psvmm = NULL;
}
}
@@ -364,6 +365,7 @@
up_write(¤t->mm->mmap_sem);
out_free:
mutex_unlock(&cli->mutex);
+ mutex_destroy(&svmm->mutex);
kfree(svmm);
return ret;
}
diff -r df2c82e0a7b4 -r 3f0db7caa907 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_client.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_client.c Sun Dec 19 11:34:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_client.c Sun Dec 19 11:34:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nvkm_core_client.c,v 1.5 2021/12/19 10:51:57 riastradh Exp $ */
+/* $NetBSD: nouveau_nvkm_core_client.c,v 1.6 2021/12/19 11:34:44 riastradh Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -24,7 +24,7 @@
* Authors: Ben Skeggs
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_client.c,v 1.5 2021/12/19 10:51:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_client.c,v 1.6 2021/12/19 11:34:44 riastradh Exp $");
#include <core/client.h>
#include <core/device.h>
@@ -276,6 +276,7 @@
int i;
for (i = 0; i < ARRAY_SIZE(client->notify); i++)
nvkm_client_notify_del(client, i);
+ spin_lock_destroy(&client->lock);
return client;
}
diff -r df2c82e0a7b4 -r 3f0db7caa907 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_engine.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_engine.c Sun Dec 19 11:34:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_engine.c Sun Dec 19 11:34:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nvkm_core_engine.c,v 1.4 2021/12/18 23:45:34 riastradh Exp $ */
+/* $NetBSD: nouveau_nvkm_core_engine.c,v 1.5 2021/12/19 11:34:44 riastradh Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -24,7 +24,7 @@
* Authors: Ben Skeggs
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_engine.c,v 1.4 2021/12/18 23:45:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_engine.c,v 1.5 2021/12/19 11:34:44 riastradh Exp $");
#include <core/engine.h>
#include <core/device.h>
@@ -159,6 +159,7 @@
nvkm_engine_dtor(struct nvkm_subdev *subdev)
{
struct nvkm_engine *engine = nvkm_engine(subdev);
+ spin_lock_destroy(&engine->lock);
if (engine->func->dtor)
return engine->func->dtor(engine);
return engine;
diff -r df2c82e0a7b4 -r 3f0db7caa907 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_subdev.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_subdev.c Sun Dec 19 11:34:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_subdev.c Sun Dec 19 11:34:44 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nvkm_core_subdev.c,v 1.4 2021/12/18 23:45:34 riastradh Exp $ */
+/* $NetBSD: nouveau_nvkm_core_subdev.c,v 1.5 2021/12/19 11:34:44 riastradh Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -24,13 +24,15 @@
* Authors: Ben Skeggs
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_subdev.c,v 1.4 2021/12/18 23:45:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_subdev.c,v 1.5 2021/12/19 11:34:44 riastradh Exp $");
#include <core/subdev.h>
#include <core/device.h>
#include <core/option.h>
#include <subdev/mc.h>
+#include <linux/nbsd-namespace.h>
+
static struct lock_class_key nvkm_subdev_lock_class[NVKM_SUBDEV_NR];
const char *
@@ -208,6 +210,7 @@
Home |
Main Index |
Thread Index |
Old Index