drm: Remove some useless macros
authorFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 9 Nov 2014 13:16:33 +0000 (14:16 +0100)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 9 Nov 2014 13:22:32 +0000 (14:22 +0100)
sys/dev/drm/i915/i915_gem.c
sys/dev/drm/include/drm/drmP.h
sys/dev/drm/radeon/radeon_fence.c
sys/dev/drm/ttm/ttm_lock.c

index 2233aaa..e726aa5 100644 (file)
@@ -931,13 +931,10 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
                goto out;
 
        size = round_page(args->size);
-       PROC_LOCK(p);
        if (map->size + size > p->p_rlimit[RLIMIT_VMEM].rlim_cur) {
-               PROC_UNLOCK(p);
                error = ENOMEM;
                goto out;
        }
-       PROC_UNLOCK(p);
 
        addr = 0;
        vm_object_hold(obj->vm_obj);
index 50f5ec7..a2f778a 100644 (file)
@@ -1609,16 +1609,9 @@ static __inline__ void drm_core_dropmap(struct drm_map *map)
 #include <drm/drm_mem_util.h>
 
 /* FreeBSD compatibility macros */
-#define PROC_LOCK(p)
-#define PROC_UNLOCK(p)
-
-#define VM_OBJECT_RLOCK(object)                VM_OBJECT_LOCK(object)
-#define VM_OBJECT_RUNLOCK(object)      VM_OBJECT_UNLOCK(object)
 #define VM_OBJECT_WLOCK(object)                VM_OBJECT_LOCK(object)
 #define VM_OBJECT_WUNLOCK(object)      VM_OBJECT_UNLOCK(object)
 
-#define CTR2(one,two,three,four)
-
 #define DRM_PCIE_SPEED_25 1
 #define DRM_PCIE_SPEED_50 2
 #define DRM_PCIE_SPEED_80 4
index b7cc9b7..0ac3806 100644 (file)
@@ -115,7 +115,6 @@ int radeon_fence_emit(struct radeon_device *rdev,
        (*fence)->seq = ++rdev->fence_drv[ring].sync_seq[ring];
        (*fence)->ring = ring;
        radeon_fence_ring_emit(rdev, ring, *fence);
-       CTR2(KTR_DRM, "radeon fence: emit (ring=%d, seq=%d)", ring, (*fence)->seq);
        return 0;
 }
 
@@ -300,9 +299,6 @@ static int radeon_fence_wait_seq(struct radeon_device *rdev, u64 target_seq,
                /* Save current last activity valuee, used to check for GPU lockups */
                last_activity = rdev->fence_drv[ring].last_activity;
 
-               CTR2(KTR_DRM, "radeon fence: wait begin (ring=%d, seq=%d)",
-                   ring, seq);
-
                radeon_irq_kms_sw_irq_get(rdev, ring);
                fence_queue_locked = false;
                r = 0;
@@ -337,8 +333,6 @@ static int radeon_fence_wait_seq(struct radeon_device *rdev, u64 target_seq,
                if (unlikely(r == EINTR || r == ERESTART)) {
                        return -r;
                }
-               CTR2(KTR_DRM, "radeon fence: wait end (ring=%d, seq=%d)",
-                   ring, seq);
 
                if (unlikely(!signaled)) {
 #ifndef __FreeBSD__
@@ -490,8 +484,6 @@ static int radeon_fence_wait_any_seq(struct radeon_device *rdev,
                        timeout = 1;
                }
 
-               CTR2(KTR_DRM, "radeon fence: wait begin (ring=%d, target_seq=%d)",
-                   ring, target_seq[ring]);
                for (i = 0; i < RADEON_NUM_RINGS; ++i) {
                        if (target_seq[i]) {
                                radeon_irq_kms_sw_irq_get(rdev, i);
@@ -534,8 +526,6 @@ static int radeon_fence_wait_any_seq(struct radeon_device *rdev,
                if (unlikely(r == EINTR || r == ERESTART)) {
                        return -r;
                }
-               CTR2(KTR_DRM, "radeon fence: wait end (ring=%d, target_seq=%d)",
-                   ring, target_seq[ring]);
 
                if (unlikely(!signaled)) {
 #ifndef __FreeBSD__
index c70c140..79c7c30 100644 (file)
@@ -64,9 +64,7 @@ ttm_lock_send_sig(int signo)
        struct proc *p;
 
        p = curproc;    /* XXXKIB curthread ? */
-       PROC_LOCK(p);
        ksignal(p, signo);
-       PROC_UNLOCK(p);
 }
 
 void ttm_read_unlock(struct ttm_lock *lock)