Module Name:    src
Committed By:   riastradh
Date:           Sun Sep  8 15:56:02 UTC 2013

Modified Files:
        src/sys/external/bsd/drm2/dist/drm/i915 [riastradh-drm2]: i915_drv.c
            i915_gem.c

Log Message:
Hook up the i915_gem uvm pager ops.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.13 -r1.1.1.1.2.14 \
    src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c
cvs rdiff -u -r1.1.1.1.2.9 -r1.1.1.1.2.10 \
    src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.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/dist/drm/i915/i915_drv.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c:1.1.1.1.2.13 src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c:1.1.1.1.2.14
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c:1.1.1.1.2.13	Wed Jul 24 04:00:35 2013
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c	Sun Sep  8 15:56:02 2013
@@ -915,7 +915,16 @@ int i915_reset(struct drm_device *dev)
 	return 0;
 }
 
-#ifndef __NetBSD__
+#ifdef __NetBSD__
+
+static const struct uvm_pagerops i915_gem_uvm_ops = {
+	.pgo_reference = drm_gem_pager_reference,
+	.pgo_detach = drm_gem_pager_detach,
+	.pgo_fault = i915_gem_fault,
+};
+
+#else
+
 static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	struct intel_device_info *intel_info =
@@ -1048,6 +1057,7 @@ static const struct file_operations i915
 #endif
 	.llseek = noop_llseek,
 };
+
 #endif	/* defined(__NetBSD__) */
 
 static struct drm_driver driver = {
@@ -1078,7 +1088,7 @@ static struct drm_driver driver = {
 	.gem_init_object = i915_gem_init_object,
 	.gem_free_object = i915_gem_free_object,
 #ifdef __NetBSD__
-	.gem_uvm_ops = NULL,
+	.gem_uvm_ops = &i915_gem_uvm_ops,
 #else
 	.gem_vm_ops = &i915_gem_vm_ops,
 #endif

Index: src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.1.1.1.2.9 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.1.1.1.2.10
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.1.1.1.2.9	Sun Sep  8 15:55:23 2013
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c	Sun Sep  8 15:56:02 2013
@@ -34,6 +34,7 @@
 #include <sys/param.h>
 
 #include <uvm/uvm.h>
+#include <uvm/uvm_extern.h>
 #include <uvm/uvm_fault.h>
 #include <uvm/uvm_page.h>
 #include <uvm/uvm_pmap.h>

Reply via email to