Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/riastradh-drm2]: src/sys/external/bsd/drm2/i915drm Detach framebuffer st...



details:   https://anonhg.NetBSD.org/src/rev/e0acaff14a77
branches:  riastradh-drm2
changeset: 788581:e0acaff14a77
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Dec 30 04:51:43 2013 +0000

description:
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!

diffstat:

 sys/external/bsd/drm2/i915drm/i915_pci.c |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r a7173984c372 -r e0acaff14a77 sys/external/bsd/drm2/i915drm/i915_pci.c
--- a/sys/external/bsd/drm2/i915drm/i915_pci.c  Mon Dec 30 04:51:35 2013 +0000
+++ b/sys/external/bsd/drm2/i915drm/i915_pci.c  Mon Dec 30 04:51:43 2013 +0000
@@ -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 @@
        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;
 



Home | Main Index | Thread Index | Old Index