1124N/A--- intel/intel_bufmgr_gem.c Wed Feb 9 09:36:09 2011
1124N/A+++ intel/intel_bufmgr_gem.c Wed Feb 9 09:38:11 2011
1124N/A@@ -116,7 +116,7 @@
1089N/A struct _drm_intel_bo_gem {
1089N/A drm_intel_bo bo;
1089N/A
1089N/A- atomic_t refcount;
1089N/A+ int refcount;
1089N/A uint32_t gem_handle;
1089N/A const char *name;
1089N/A
1124N/A@@ -351,7 +351,7 @@
1089N/A {
1089N/A drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
1089N/A
1089N/A- atomic_inc(&bo_gem->refcount);
1124N/A+ bo_gem->refcount++;
1089N/A }
1089N/A
1089N/A /**
1124N/A@@ -693,7 +693,7 @@
1089N/A }
1089N/A
1089N/A bo_gem->name = name;
1089N/A- atomic_set(&bo_gem->refcount, 1);
1089N/A+ bo_gem->refcount = 1;
1089N/A bo_gem->validate_index = -1;
1089N/A bo_gem->reloc_tree_fences = 0;
1089N/A bo_gem->used_as_reloc_target = 0;
1124N/A@@ -813,7 +813,7 @@
1089N/A bo_gem->bo.virtual = NULL;
1089N/A bo_gem->bo.bufmgr = bufmgr;
1089N/A bo_gem->name = name;
1089N/A- atomic_set(&bo_gem->refcount, 1);
1089N/A+ bo_gem->refcount = 1;
1089N/A bo_gem->validate_index = -1;
1089N/A bo_gem->gem_handle = open_arg.handle;
1089N/A bo_gem->global_name = handle;
1124N/A@@ -945,8 +945,8 @@
1089N/A {
1089N/A drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
1089N/A
1089N/A- assert(atomic_read(&bo_gem->refcount) > 0);
1089N/A- if (atomic_dec_and_test(&bo_gem->refcount))
1089N/A+ assert(bo_gem->refcount > 0);
1089N/A+ if (--bo_gem->refcount == 0)
1089N/A drm_intel_gem_bo_unreference_final(bo, time);
1089N/A }
1089N/A
1124N/A@@ -954,8 +954,8 @@
1089N/A {
1089N/A drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
1089N/A
1089N/A- assert(atomic_read(&bo_gem->refcount) > 0);
1089N/A- if (atomic_dec_and_test(&bo_gem->refcount)) {
1089N/A+ assert(bo_gem->refcount > 0);
1089N/A+ if (--bo_gem->refcount == 0) {
1089N/A drm_intel_bufmgr_gem *bufmgr_gem =
1089N/A (drm_intel_bufmgr_gem *) bo->bufmgr;
1089N/A struct timespec time;
1351N/A--- intel/intel_bufmgr_gem.c Wed Sep 26 12:45:00 2012
1351N/A+++ intel/intel_bufmgr_gem.c Wed Sep 26 12:45:42 2012
1351N/A@@ -2438,7 +2438,7 @@
1351N/A
1351N/A bo_gem->gem_handle = handle;
1351N/A
1351N/A- atomic_set(&bo_gem->refcount, 1);
1351N/A+ bo_gem->refcount = 1;
1351N/A
1351N/A bo_gem->name = "prime";
1351N/A bo_gem->validate_index = -1;