aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drmP.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-08-14 09:36:34 +1000
committerDave Airlie <airlied@redhat.com>2008-08-14 09:36:34 +1000
commit2d4420c6669dbaead27346b8c7e1979edc94ae5a (patch)
tree134fcbc1e4b902f7e1918d32c991bf2923da2101 /linux-core/drmP.h
parent1c6abcefdc37f5cbb447e8fee1f3805fd7d19bea (diff)
parent2a65759d159478b126c660ef124777548dcc872c (diff)
Merge branch 'radeon-gem-cs' into modesetting-gem
Conflicts: libdrm/xf86drm.c linux-core/Makefile.kernel linux-core/drmP.h linux-core/drm_compat.h linux-core/drm_drv.c linux-core/drm_stub.c linux-core/drm_vm.c shared-core/i915_dma.c shared-core/r300_cmdbuf.c shared-core/radeon_drv.h
Diffstat (limited to 'linux-core/drmP.h')
-rw-r--r--linux-core/drmP.h33
1 files changed, 8 insertions, 25 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index bfe2ae1a..1b71b45d 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -166,7 +166,6 @@ typedef unsigned long uintptr_t;
#define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8)
#define DRM_MAP_HASH_OFFSET 0x10000000
#define DRM_MAP_HASH_ORDER 12
-#define DRM_OBJECT_HASH_ORDER 12
#define DRM_FILE_PAGE_OFFSET_START ((0xFFFFFFFFUL >> PAGE_SHIFT) + 1)
#define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFFUL >> PAGE_SHIFT) * 16)
/*
@@ -405,14 +404,6 @@ struct drm_buf_entry {
struct drm_freelist freelist;
};
-
-enum drm_ref_type {
- _DRM_REF_USE = 0,
- _DRM_REF_TYPE1,
- _DRM_NO_REF_TYPES
-};
-
-
/** File private data */
struct drm_file {
int authenticated;
@@ -424,21 +415,11 @@ struct drm_file {
struct drm_minor *minor;
unsigned long lock_count;
- /*
- * The user object hash table is global and resides in the
- * drm_device structure. We protect the lists and hash tables with the
- * device struct_mutex. A bit coarse-grained but probably the best
- * option.
- */
-
- struct list_head refd_objects;
-
/** Mapping of mm object handles to object pointers. */
struct idr object_idr;
/** Lock for synchronization of access to object_idr. */
spinlock_t table_lock;
- struct drm_open_hash refd_object_hash[_DRM_NO_REF_TYPES];
struct file *filp;
void *driver_priv;
@@ -684,7 +665,9 @@ struct drm_gem_object {
/* per-master structure */
struct drm_master {
-
+
+ struct kref refcount; /* refcount for this master */
+
struct list_head head; /**< each minor contains a list of masters */
struct drm_minor *minor; /**< link back to minor we are a master for */
@@ -901,7 +884,6 @@ struct drm_device {
int map_count; /**< Number of mappable regions */
struct drm_open_hash map_hash; /**< User token hash table for maps */
struct drm_mm offset_manager; /**< User token manager */
- struct drm_open_hash object_hash; /**< User token hash table for objects */
struct address_space *dev_mapping; /**< For unmap_mapping_range() */
struct page *ttm_dummy_page;
@@ -1366,12 +1348,13 @@ extern int drm_setmaster_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
-extern struct drm_master *drm_get_master(struct drm_minor *minor);
-extern void drm_put_master(struct drm_master *master);
+struct drm_master *drm_master_create(struct drm_minor *minor);
+extern struct drm_master *drm_master_get(struct drm_master *master);
+extern void drm_master_put(struct drm_master **master);
extern int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
- struct drm_driver *driver);
+ struct drm_driver *driver);
extern int drm_put_dev(struct drm_device *dev);
-extern int drm_put_minor(struct drm_device *dev, struct drm_minor **p);
+extern int drm_put_minor(struct drm_minor **minor_p);
extern unsigned int drm_debug; /* 1 to enable debug output */
extern struct class *drm_class;