Module Name:    src
Committed By:   snj
Date:           Thu Feb 11 22:55:50 UTC 2016

Modified Files:
        src/sys/external/bsd/drm2/nouveau [netbsd-7]: nouveau_pci.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1081):
        sys/external/bsd/drm2/nouveau/nouveau_pci.c: revision 1.6
push the real attach down via config_mountroot, like radeon, as we
need firmware files.. which are currently missing:
drm kern error: nouveau E[  PGRAPH][nouveau0] failed to load fuc409c


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.4 -r1.3.2.5 \
    src/sys/external/bsd/drm2/nouveau/nouveau_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c
diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.3.2.4 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.3.2.5
--- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.3.2.4	Thu Feb 11 22:52:58 2016
+++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c	Thu Feb 11 22:55:50 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_pci.c,v 1.3.2.4 2016/02/11 22:52:58 snj Exp $	*/
+/*	$NetBSD: nouveau_pci.c,v 1.3.2.5 2016/02/11 22:55:50 snj Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.3.2.4 2016/02/11 22:52:58 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.3.2.5 2016/02/11 22:55:50 snj Exp $");
 
 #include <sys/types.h>
 #include <sys/device.h>
@@ -51,6 +51,7 @@ SIMPLEQ_HEAD(nouveau_pci_task_head, nouv
 
 struct nouveau_pci_softc {
 	device_t		sc_dev;
+	struct pci_attach_args	sc_pa;
 	enum {
 		NOUVEAU_TASK_ATTACH,
 		NOUVEAU_TASK_WORKQUEUE,
@@ -66,6 +67,7 @@ struct nouveau_pci_softc {
 
 static int	nouveau_pci_match(device_t, cfdata_t, void *);
 static void	nouveau_pci_attach(device_t, device_t, void *);
+static void	nouveau_attach_real(device_t);
 static int	nouveau_pci_detach(device_t, int);
 
 static bool	nouveau_pci_suspend(device_t, const pmf_qual_t *);
@@ -102,17 +104,27 @@ nouveau_pci_attach(device_t parent, devi
 {
 	struct nouveau_pci_softc *const sc = device_private(self);
 	const struct pci_attach_args *const pa = aux;
-	uint64_t devname;
-	int error;
 
 	pci_aprint_devinfo(pa, NULL);
 
 	sc->sc_dev = self;
+	sc->sc_pa = *pa;
 
 	if (!pmf_device_register(self, &nouveau_pci_suspend,
 		&nouveau_pci_resume))
 		aprint_error_dev(self, "unable to establish power handler\n");
 
+	config_mountroot(self, &nouveau_attach_real);
+}
+
+static void
+nouveau_attach_real(device_t self)
+{
+	struct nouveau_pci_softc *const sc = device_private(self);
+	const struct pci_attach_args *const pa = &sc->sc_pa;
+	uint64_t devname;
+	int error;
+
 	sc->sc_task_state = NOUVEAU_TASK_ATTACH;
 	SIMPLEQ_INIT(&sc->sc_task_u.attach);
 

Reply via email to