gfx: pvr: Expose helper macro to compare synchronization values
authorPauli Nieminen <pauli.nieminen@linux.intel.com>
Thu, 1 Mar 2012 22:40:35 +0000 (00:40 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:21 +0000 (12:30 +0300)
To make it simpler to compare synchronization values safetily expose the
helper macro in a header.

Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/pvr/services4/srvkm/env/linux/ossync.c
drivers/staging/mrst/pvr/services4/srvkm/include/ossync.h

index c5d7cd7..b232d0e 100644 (file)
 static DEFINE_SPINLOCK(sync_lock);
 static LIST_HEAD(sync_list);
 
-#define ops_after(a, b) ((s32)(b) - (s32)(a) < 0)
-
 static bool pending_ops_completed(PVRSRV_KERNEL_SYNC_INFO *sync_info,
                                  unsigned int flags,
                                  u32 pending_read_ops,
                                  u32 pending_write_ops)
 {
        if (flags & PVRSRV_SYNC_READ &&
-           ops_after(pending_read_ops, sync_info->psSyncData->ui32ReadOpsComplete))
+           pvr_ops_after(pending_read_ops, sync_info->psSyncData->ui32ReadOpsComplete))
                return false;
 
        if (flags & PVRSRV_SYNC_WRITE &&
-           ops_after(pending_write_ops, sync_info->psSyncData->ui32WriteOpsComplete))
+           pvr_ops_after(pending_write_ops, sync_info->psSyncData->ui32WriteOpsComplete))
                return false;
 
        return true;
index d056ac7..6d8c2ce 100644 (file)
@@ -27,6 +27,8 @@
 #define PVRSRV_SYNC_READ       (1 << 0)
 #define PVRSRV_SYNC_WRITE      (1 << 1)
 
+#define pvr_ops_after(a, b) ((s32)(b) - (s32)(a) < 0)
+
 struct pvr_pending_sync;
 
 typedef void (*pvr_sync_callback)(struct pvr_pending_sync *pending_sync, bool from_misr);