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/amdgpu amdgpu: Run module initialization.



details:   https://anonhg.NetBSD.org/src/rev/af09ec896933
branches:  trunk
changeset: 1028931:af09ec896933
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:30:40 2021 +0000

description:
amdgpu: Run module initialization.

diffstat:

 sys/external/bsd/drm2/amdgpu/amdgpu_module.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r ced4a6eebfc6 -r af09ec896933 sys/external/bsd/drm2/amdgpu/amdgpu_module.c
--- a/sys/external/bsd/drm2/amdgpu/amdgpu_module.c      Sun Dec 19 12:30:31 2021 +0000
+++ b/sys/external/bsd/drm2/amdgpu/amdgpu_module.c      Sun Dec 19 12:30:40 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdgpu_module.c,v 1.8 2021/12/19 12:30:14 riastradh Exp $      */
+/*     $NetBSD: amdgpu_module.c,v 1.9 2021/12/19 12:30:40 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_module.c,v 1.8 2021/12/19 12:30:14 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_module.c,v 1.9 2021/12/19 12:30:40 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/module.h>
@@ -80,6 +80,11 @@
        linux_mutex_init(&mgpu_info.mutex);
        ida_init(&amdgpu_pasid_ida);
 
+       error = amdgpu_sync_init();
+       KASSERT(error == 0);
+       error = amdgpu_fence_slab_init();
+       KASSERT(error == 0);
+
 #if notyet                     /* XXX amdgpu acpi */
        amdgpu_register_atpx_handler();
 #endif
@@ -112,6 +117,8 @@
 #if notyet                     /* XXX amdgpu acpi */
        amdgpu_unregister_atpx_handler();
 #endif
+       amdgpu_fence_slab_fini();
+       amdgpu_sync_fini();
 
        ida_destroy(&amdgpu_pasid_ida);
        linux_mutex_destroy(&mgpu_info.mutex);



Home | Main Index | Thread Index | Old Index