Wed Jul 24 02:53:07 2013 UTC ()
Ifdef out the Linux-style vm routines in drm_gem.c.


(riastradh)
diff -r1.1.1.1.2.6 -r1.1.1.1.2.7 src/sys/external/bsd/drm2/dist/drm/drm_gem.c

cvs diff -r1.1.1.1.2.6 -r1.1.1.1.2.7 src/sys/external/bsd/drm2/dist/drm/drm_gem.c (expand / switch to unified diff)

--- src/sys/external/bsd/drm2/dist/drm/drm_gem.c 2013/07/24 02:52:52 1.1.1.1.2.6
+++ src/sys/external/bsd/drm2/dist/drm/drm_gem.c 2013/07/24 02:53:07 1.1.1.1.2.7
@@ -659,26 +659,28 @@ void drm_gem_object_handle_free(struct d @@ -659,26 +659,28 @@ void drm_gem_object_handle_free(struct d
659 /* 659 /*
660 * The object name held a reference to this object, drop 660 * The object name held a reference to this object, drop
661 * that now. 661 * that now.
662 * 662 *
663 * This cannot be the last reference, since the handle holds one too. 663 * This cannot be the last reference, since the handle holds one too.
664 */ 664 */
665 kref_put(&obj->refcount, drm_gem_object_ref_bug); 665 kref_put(&obj->refcount, drm_gem_object_ref_bug);
666 } else 666 } else
667 spin_unlock(&dev->object_name_lock); 667 spin_unlock(&dev->object_name_lock);
668 668
669} 669}
670EXPORT_SYMBOL(drm_gem_object_handle_free); 670EXPORT_SYMBOL(drm_gem_object_handle_free);
671 671
 672#ifndef __NetBSD__
 673
672void drm_gem_vm_open(struct vm_area_struct *vma) 674void drm_gem_vm_open(struct vm_area_struct *vma)
673{ 675{
674 struct drm_gem_object *obj = vma->vm_private_data; 676 struct drm_gem_object *obj = vma->vm_private_data;
675 677
676 drm_gem_object_reference(obj); 678 drm_gem_object_reference(obj);
677 679
678 mutex_lock(&obj->dev->struct_mutex); 680 mutex_lock(&obj->dev->struct_mutex);
679 drm_vm_open_locked(obj->dev, vma); 681 drm_vm_open_locked(obj->dev, vma);
680 mutex_unlock(&obj->dev->struct_mutex); 682 mutex_unlock(&obj->dev->struct_mutex);
681} 683}
682EXPORT_SYMBOL(drm_gem_vm_open); 684EXPORT_SYMBOL(drm_gem_vm_open);
683 685
684void drm_gem_vm_close(struct vm_area_struct *vma) 686void drm_gem_vm_close(struct vm_area_struct *vma)
@@ -758,13 +760,15 @@ int drm_gem_mmap(struct file *filp, stru @@ -758,13 +760,15 @@ int drm_gem_mmap(struct file *filp, stru
758 * (which should happen whether the vma was created by this call, or 760 * (which should happen whether the vma was created by this call, or
759 * by a vm_open due to mremap or partial unmap or whatever). 761 * by a vm_open due to mremap or partial unmap or whatever).
760 */ 762 */
761 drm_gem_object_reference(obj); 763 drm_gem_object_reference(obj);
762 764
763 drm_vm_open_locked(dev, vma); 765 drm_vm_open_locked(dev, vma);
764 766
765out_unlock: 767out_unlock:
766 mutex_unlock(&dev->struct_mutex); 768 mutex_unlock(&dev->struct_mutex);
767 769
768 return ret; 770 return ret;
769} 771}
770EXPORT_SYMBOL(drm_gem_mmap); 772EXPORT_SYMBOL(drm_gem_mmap);
 773
 774#endif /* defined(__NetBSD__) */