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/radeon Actually hook up the r...



details:   https://anonhg.NetBSD.org/src/rev/d02929a96107
branches:  trunk
changeset: 330653:d02929a96107
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Jul 17 03:34:13 2014 +0000

description:
Actually hook up the radeon_ttm uvm pager ops!

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c |  19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r e82cf36c4a97 -r d02929a96107 sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c        Thu Jul 17 01:50:57 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c        Thu Jul 17 03:34:13 2014 +0000
@@ -45,6 +45,7 @@
 
 #ifdef __NetBSD__
 #include <uvm/uvm_extern.h>
+#include <uvm/uvm_fault.h>
 #include <uvm/uvm_param.h>
 #include <drm/bus_dma_hacks.h>
 #endif
@@ -702,10 +703,24 @@
 #endif
 }
 
+#ifdef __NetBSD__
+static int     radeon_ttm_fault(struct uvm_faultinfo *, vaddr_t,
+                   struct vm_page **, int, int, vm_prot_t, int);
+
+static const struct uvm_pagerops radeon_uvm_ops = {
+       .pgo_reference = &ttm_bo_uvm_reference,
+       .pgo_detach = &ttm_bo_uvm_detach,
+       .pgo_fault = &radeon_ttm_fault,
+};
+#endif
+
 static struct ttm_bo_driver radeon_bo_driver = {
        .ttm_tt_create = &radeon_ttm_tt_create,
        .ttm_tt_populate = &radeon_ttm_tt_populate,
        .ttm_tt_unpopulate = &radeon_ttm_tt_unpopulate,
+#ifdef __NetBSD__
+       .ttm_uvm_ops = &radeon_uvm_ops,
+#endif
        .invalidate_caches = &radeon_invalidate_caches,
        .init_mem_type = &radeon_init_mem_type,
        .evict_flags = &radeon_evict_flags,
@@ -830,9 +845,7 @@
 
 #ifdef __NetBSD__
 
-#include <uvm/uvm_fault.h>
-
-int
+static int
 radeon_ttm_fault(struct uvm_faultinfo *ufi, vaddr_t vaddr,
     struct vm_page **pps, int npages, int centeridx, vm_prot_t access_type,
     int flags)



Home | Main Index | Thread Index | Old Index