Lines Matching refs:ht
42 int drm_ht_create(struct drm_open_hash *ht, unsigned int order) in drm_ht_create() argument
44 ht->size = 1 << order; in drm_ht_create()
45 ht->order = order; in drm_ht_create()
46 ht->table = NULL; in drm_ht_create()
47 ht->table = hashinit_flags(ht->size, DRM_MEM_HASHTAB, &ht->mask, in drm_ht_create()
49 if (!ht->table) { in drm_ht_create()
57 void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key) in drm_ht_verbose_list() argument
64 hashed_key = hash32_buf(&key, sizeof(key), ht->order); in drm_ht_verbose_list()
66 h_list = &ht->table[hashed_key & ht->mask]; in drm_ht_verbose_list()
71 static struct drm_hash_item *drm_ht_find_key(struct drm_open_hash *ht, in drm_ht_find_key() argument
78 hashed_key = hash32_buf(&key, sizeof(key), ht->order); in drm_ht_find_key()
79 h_list = &ht->table[hashed_key & ht->mask]; in drm_ht_find_key()
90 int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item) in drm_ht_insert_item() argument
97 hashed_key = hash32_buf(&key, sizeof(key), ht->order); in drm_ht_insert_item()
98 h_list = &ht->table[hashed_key & ht->mask]; in drm_ht_insert_item()
120 int drm_ht_just_insert_please(struct drm_open_hash *ht, struct drm_hash_item *item, in drm_ht_just_insert_please() argument
132 ret = drm_ht_insert_item(ht, item); in drm_ht_just_insert_please()
145 int drm_ht_find_item(struct drm_open_hash *ht, unsigned long key, in drm_ht_find_item() argument
150 entry = drm_ht_find_key(ht, key); in drm_ht_find_item()
159 int drm_ht_remove_key(struct drm_open_hash *ht, unsigned long key) in drm_ht_remove_key() argument
163 entry = drm_ht_find_key(ht, key); in drm_ht_remove_key()
171 int drm_ht_remove_item(struct drm_open_hash *ht, struct drm_hash_item *item) in drm_ht_remove_item() argument
178 void drm_ht_remove(struct drm_open_hash *ht) in drm_ht_remove() argument
180 if (ht->table) { in drm_ht_remove()
181 hashdestroy(ht->table, DRM_MEM_HASHTAB, ht->mask); in drm_ht_remove()
182 ht->table = NULL; in drm_ht_remove()