aboutsummaryrefslogtreecommitdiffstats
path: root/src/etnaviv/drm/etnaviv_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/etnaviv/drm/etnaviv_device.c')
-rw-r--r--src/etnaviv/drm/etnaviv_device.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/etnaviv/drm/etnaviv_device.c b/src/etnaviv/drm/etnaviv_device.c
index 32991d0a5b3..b1fc6b91c89 100644
--- a/src/etnaviv/drm/etnaviv_device.c
+++ b/src/etnaviv/drm/etnaviv_device.c
@@ -31,18 +31,6 @@
static pthread_mutex_t etna_drm_table_lock = PTHREAD_MUTEX_INITIALIZER;
-static uint32_t
-u32_hash(const void *key)
-{
- return _mesa_hash_data(key, sizeof(uint32_t));
-}
-
-static bool
-u32_equals(const void *key1, const void *key2)
-{
- return *(const uint32_t *)key1 == *(const uint32_t *)key2;
-}
-
struct etna_device *etna_device_new(int fd)
{
struct etna_device *dev = calloc(sizeof(*dev), 1);
@@ -56,8 +44,8 @@ struct etna_device *etna_device_new(int fd)
p_atomic_set(&dev->refcnt, 1);
dev->fd = fd;
- dev->handle_table = _mesa_hash_table_create(NULL, u32_hash, u32_equals);
- dev->name_table = _mesa_hash_table_create(NULL, u32_hash, u32_equals);
+ dev->handle_table = _mesa_hash_table_create(NULL, _mesa_hash_u32, _mesa_key_u32_equal);
+ dev->name_table = _mesa_hash_table_create(NULL, _mesa_hash_u32, _mesa_key_u32_equal);
etna_bo_cache_init(&dev->bo_cache);
ret = drmCommandWriteRead(dev->fd, DRM_ETNAVIV_GET_PARAM, &req, sizeof(req));