aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/glamo/glamo-drm-private.h
diff options
context:
space:
mode:
authorAndreas Pokorny <andreas.pokorny@gmail.com>2009-06-03 21:04:47 +0200
committerAndreas Pokorny <andreas.pokorny@gmail.com>2009-06-03 21:04:47 +0200
commitf3ef2188923d357c94a2421024c8288e428feccb (patch)
treedd77593dcb5bf87557471ec933bed0f52de85bb6 /drivers/mfd/glamo/glamo-drm-private.h
parente8950ddf2823a4b2698870b057409fd98abb3aae (diff)
Glamo DRM: Adding a Semaphore and Spinlock
This is the first step towards the irq based update of the write pointer. With this revision the previous wait, and direct update is deactivated. Signed-off-by: Andreas Pokorny <andreas.pokorny@gmail.com>
Diffstat (limited to 'drivers/mfd/glamo/glamo-drm-private.h')
-rw-r--r--drivers/mfd/glamo/glamo-drm-private.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mfd/glamo/glamo-drm-private.h b/drivers/mfd/glamo/glamo-drm-private.h
index 59fbc2488c5..9442532dafe 100644
--- a/drivers/mfd/glamo/glamo-drm-private.h
+++ b/drivers/mfd/glamo/glamo-drm-private.h
@@ -29,6 +29,8 @@
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/spinlock.h>
+#include <linux/semaphore.h>
#include "glamo-core.h"
@@ -56,6 +58,12 @@ struct glamodrm_handle {
/* Memory management */
struct drm_mm *mmgr;
+
+ /* semaphore against concurrent ioctl */
+ struct semaphore add_to_ring;
+
+ spinlock_t new_ring_write_lock;
+ size_t new_ring_write;
};
/* Private data. This is where we keep our memory management bits */