aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/intel/drm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/intel/drm')
-rw-r--r--src/gallium/winsys/intel/drm/intel_drm_winsys.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gallium/winsys/intel/drm/intel_drm_winsys.c b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
index d05e0362a6c..b5ffceb7e65 100644
--- a/src/gallium/winsys/intel/drm/intel_drm_winsys.c
+++ b/src/gallium/winsys/intel/drm/intel_drm_winsys.c
@@ -464,16 +464,20 @@ intel_winsys_decode_bo(struct intel_winsys *winsys,
intel_bo_unmap(bo);
}
-void
-intel_bo_reference(struct intel_bo *bo)
+struct intel_bo *
+intel_bo_ref(struct intel_bo *bo)
{
- drm_intel_bo_reference(gem_bo(bo));
+ if (bo)
+ drm_intel_bo_reference(gem_bo(bo));
+
+ return bo;
}
void
-intel_bo_unreference(struct intel_bo *bo)
+intel_bo_unref(struct intel_bo *bo)
{
- drm_intel_bo_unreference(gem_bo(bo));
+ if (bo)
+ drm_intel_bo_unreference(gem_bo(bo));
}
int