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/dist/drm/i915 Hook up the i91...
details: https://anonhg.NetBSD.org/src/rev/22a96889b02c
branches: riastradh-drm2
changeset: 788530:22a96889b02c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Sep 08 15:56:02 2013 +0000
description:
Hook up the i915_gem uvm pager ops.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_drv.c | 14 ++++++++++++--
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 1 +
2 files changed, 13 insertions(+), 2 deletions(-)
diffs (49 lines):
diff -r 49ee6a352597 -r 22a96889b02c sys/external/bsd/drm2/dist/drm/i915/i915_drv.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c Sun Sep 08 15:55:23 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c Sun Sep 08 15:56:02 2013 +0000
@@ -915,7 +915,16 @@
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 @@
#endif
.llseek = noop_llseek,
};
+
#endif /* defined(__NetBSD__) */
static struct drm_driver driver = {
@@ -1078,7 +1088,7 @@
.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
diff -r 49ee6a352597 -r 22a96889b02c sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Sun Sep 08 15:55:23 2013 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Sun Sep 08 15:56:02 2013 +0000
@@ -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>
Home |
Main Index |
Thread Index |
Old Index