gralloc: add refcount to gralloc_drm_bo_t

This is an basic enabler for gralloc to let buffers live while they are still
in use by gralloc (for example during scanout), otherwise Android may choose
to destroy them while they are still needed. This facility will get used with
upcoming plane support and direct rendering support.

Change-Id: I2f0bc595846a68e8d2feb5138b022d16f207e2b5
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
diff --git a/gralloc_drm_priv.h b/gralloc_drm_priv.h
index 1da3e4a..33f688d 100644
--- a/gralloc_drm_priv.h
+++ b/gralloc_drm_priv.h
@@ -110,6 +110,8 @@
 
 	int lock_count;
 	int locked_for;
+
+	unsigned int refcount;
 };
 
 struct gralloc_drm_drv_t *gralloc_drm_drv_create_for_pipe(int fd, const char *name);