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/ttm Fix ttm swap storage dest...



details:   https://anonhg.NetBSD.org/src/rev/da82f2e9d983
branches:  trunk
changeset: 797565:da82f2e9d983
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Jul 22 15:15:22 2014 +0000

description:
Fix ttm swap storage destruction.

diffstat:

 sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r e2c59a722b0e -r da82f2e9d983 sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c
--- a/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c       Tue Jul 22 13:32:59 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c       Tue Jul 22 15:15:22 2014 +0000
@@ -181,11 +181,9 @@
        if (ttm->state == tt_unbound)
                ttm_tt_unpopulate(ttm);
 
+#ifndef __NetBSD__
        if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP) &&
            ttm->swap_storage)
-#ifdef __NetBSD__
-               uao_detach(ttm->swap_storage);
-#else
                fput(ttm->swap_storage);
 #endif
 
@@ -224,8 +222,10 @@
 
 void ttm_tt_fini(struct ttm_tt *ttm)
 {
+#ifdef __NetBSD__
        uao_detach(ttm->swap_storage);
        ttm->swap_storage = NULL;
+#endif
        drm_free_large(ttm->pages);
        ttm->pages = NULL;
 }
@@ -297,7 +297,10 @@
 {
        struct ttm_tt *ttm = &ttm_dma->ttm;
 
+#ifdef __NetBSD__
        uao_detach(ttm->swap_storage);
+       ttm->swap_storage = NULL;
+#endif
        drm_free_large(ttm->pages);
        ttm->pages = NULL;
 #ifdef __NetBSD__



Home | Main Index | Thread Index | Old Index