Module Name:    src
Committed By:   riastradh
Date:           Wed Jul 24 02:52:22 UTC 2013

Modified Files:
        src/sys/external/bsd/drm2/dist/include/drm [riastradh-drm2]: drmP.h

Log Message:
Adjust fields of struct drm_gem_object for uvm.

Add a struct uvm_object pointer gemo_uao for an anonymous object to
back shared memory, and a struct uvm_object gemo_uvmobj for custom
device page mapping.

In struct drm_driver, replace the Linux VM operations gem_vm_ops by
NetBSD UVM operations gem_uvm_ops, so that the compiler will catch
any extant references to the Linux structure that will need changing.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.39 -r1.1.1.1.2.40 \
    src/sys/external/bsd/drm2/dist/include/drm/drmP.h

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/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.39 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.40
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.1.1.1.2.39	Wed Jul 24 02:51:51 2013
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Wed Jul 24 02:52:22 2013
@@ -755,8 +755,16 @@ struct drm_gem_object {
 	/** Related drm device */
 	struct drm_device *dev;
 
+#ifdef __NetBSD__
+	/* UVM anonymous object for shared memory mappings.  */
+	struct uvm_object *gemo_shm_uao;
+
+	/* UVM object with custom pager ops for device memory mappings.  */
+	struct uvm_object gemo_uvmobj;
+#else
 	/** File representing the shmem storage */
 	struct file *filp;
+#endif
 
 	/* Mapping info for this object */
 	struct drm_map_list map_list;
@@ -1074,7 +1082,11 @@ struct drm_driver {
 			    uint32_t handle);
 
 	/* Driver private ops for this object */
+#ifdef __NetBSD__
+	const struct uvm_pagerops *gem_uvm_ops;
+#else
 	const struct vm_operations_struct *gem_vm_ops;
+#endif
 
 	int major;
 	int minor;

Reply via email to