From a14d6a6a43742cfad7ab346bf9168eb893881816 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Sun, 13 Nov 2016 21:14:57 +0100 Subject: etnaviv: add API to get drm fd from etna_device Signed-off-by: Christian Gmeiner Acked-by: Eric Anholt --- etnaviv/etnaviv-symbol-check | 1 + etnaviv/etnaviv_device.c | 5 +++++ etnaviv/etnaviv_drmif.h | 1 + 3 files changed, 7 insertions(+) (limited to 'etnaviv') diff --git a/etnaviv/etnaviv-symbol-check b/etnaviv/etnaviv-symbol-check index 77c94c6e..378e073e 100755 --- a/etnaviv/etnaviv-symbol-check +++ b/etnaviv/etnaviv-symbol-check @@ -13,6 +13,7 @@ _init etna_device_new etna_device_ref etna_device_del +etna_device_fd etna_gpu_new etna_gpu_del etna_gpu_get_param diff --git a/etnaviv/etnaviv_device.c b/etnaviv/etnaviv_device.c index f954ca4e..b7163609 100644 --- a/etnaviv/etnaviv_device.c +++ b/etnaviv/etnaviv_device.c @@ -94,3 +94,8 @@ void etna_device_del(struct etna_device *dev) etna_device_del_impl(dev); pthread_mutex_unlock(&table_lock); } + +int etna_device_fd(struct etna_device *dev) +{ + return dev->fd; +} diff --git a/etnaviv/etnaviv_drmif.h b/etnaviv/etnaviv_drmif.h index 979b16a9..3a5cb51b 100644 --- a/etnaviv/etnaviv_drmif.h +++ b/etnaviv/etnaviv_drmif.h @@ -86,6 +86,7 @@ enum etna_param_id { struct etna_device *etna_device_new(int fd); struct etna_device *etna_device_ref(struct etna_device *dev); void etna_device_del(struct etna_device *dev); +int etna_device_fd(struct etna_device *dev); /* gpu functions: */ -- cgit v1.2.3