Module Name: src
Committed By: riastradh
Date: Mon Dec 30 04:51:43 UTC 2013
Modified Files:
src/sys/external/bsd/drm2/i915drm [riastradh-drm2]: i915_pci.c
Log Message:
Detach framebuffer stuff before drm device in i915drm_detach.
Detaching the drm device calls the i915_driver_unload routine, which
nukes the i915 private data structures, so that we can't use them any
more to detach the framebuffer.
Now i915drm2 unloads!
To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/sys/external/bsd/drm2/i915drm/i915_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/i915drm/i915_pci.c
diff -u src/sys/external/bsd/drm2/i915drm/i915_pci.c:1.1.2.4 src/sys/external/bsd/drm2/i915drm/i915_pci.c:1.1.2.5
--- src/sys/external/bsd/drm2/i915drm/i915_pci.c:1.1.2.4 Sun Sep 8 16:41:07 2013
+++ src/sys/external/bsd/drm2/i915drm/i915_pci.c Mon Dec 30 04:51:43 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_pci.c,v 1.1.2.4 2013/09/08 16:41:07 riastradh Exp $ */
+/* $NetBSD: i915_pci.c,v 1.1.2.5 2013/12/30 04:51:43 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_pci.c,v 1.1.2.4 2013/09/08 16:41:07 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_pci.c,v 1.1.2.5 2013/12/30 04:51:43 riastradh Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -165,12 +165,17 @@ i915drm_detach(device_t self, int flags)
struct i915drm_softc *const sc = device_private(self);
int error;
- /* Detach the drm driver first. */
- error = config_detach_children(self, flags);
+ /*
+ * XXX OK to do this first? Detaching the drm driver runs
+ * i915_driver_unload, which frees all the i915 private data
+ * structures.
+ */
+ error = i915drm_detach_framebuffer(self, flags);
if (error)
return error;
- error = i915drm_detach_framebuffer(self, flags);
+ /* Detach the drm driver first. */
+ error = config_detach_children(self, flags);
if (error)
return error;