drm/i915: Sanitize the shared DPLL reserve/release interface
[sfrench/cifs-2.6.git] / drivers / gpu / drm / drm_auth.c
index 22c7a104b802eb3bad5619ab1f47d4a6d2457564..bf98402f3210da1189703270ca3bbd2944d5a77c 100644 (file)
@@ -351,3 +351,23 @@ void drm_master_put(struct drm_master **master)
        *master = NULL;
 }
 EXPORT_SYMBOL(drm_master_put);
+
+/* Used by drm_client and drm_fb_helper */
+bool drm_master_internal_acquire(struct drm_device *dev)
+{
+       mutex_lock(&dev->master_mutex);
+       if (dev->master) {
+               mutex_unlock(&dev->master_mutex);
+               return false;
+       }
+
+       return true;
+}
+EXPORT_SYMBOL(drm_master_internal_acquire);
+
+/* Used by drm_client and drm_fb_helper */
+void drm_master_internal_release(struct drm_device *dev)
+{
+       mutex_unlock(&dev->master_mutex);
+}
+EXPORT_SYMBOL(drm_master_internal_release);