etnaviv: add API to get drm fd from etna_device

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
main
Christian Gmeiner 2016-11-13 21:14:57 +01:00
parent 3e81f8b7b9
commit a14d6a6a43
3 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,7 @@ _init
etna_device_new etna_device_new
etna_device_ref etna_device_ref
etna_device_del etna_device_del
etna_device_fd
etna_gpu_new etna_gpu_new
etna_gpu_del etna_gpu_del
etna_gpu_get_param etna_gpu_get_param

View File

@ -94,3 +94,8 @@ void etna_device_del(struct etna_device *dev)
etna_device_del_impl(dev); etna_device_del_impl(dev);
pthread_mutex_unlock(&table_lock); pthread_mutex_unlock(&table_lock);
} }
int etna_device_fd(struct etna_device *dev)
{
return dev->fd;
}

View File

@ -86,6 +86,7 @@ enum etna_param_id {
struct etna_device *etna_device_new(int fd); struct etna_device *etna_device_new(int fd);
struct etna_device *etna_device_ref(struct etna_device *dev); struct etna_device *etna_device_ref(struct etna_device *dev);
void etna_device_del(struct etna_device *dev); void etna_device_del(struct etna_device *dev);
int etna_device_fd(struct etna_device *dev);
/* gpu functions: /* gpu functions:
*/ */