diff options
author | Russell King <rmk@arm.linux.org.uk> | 2014-03-20 18:00:12 +0000 |
---|---|---|
committer | Russell King <rmk@arm.linux.org.uk> | 2014-03-20 18:00:12 +0000 |
commit | 13adefefe68d459f3133debe7a029412d5c09697 (patch) | |
tree | d2678a7ff638dfbc6ffff643e637ba1b3896fbee /src | |
parent | 4f62e0956893fe43594ba516a152a6c03a555dfe (diff) |
Split out the ioctl issuing function
This functionality can be re-used by providing other ioctls, so move
it out from vivante_map_bo_to_gpu().
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/vivante_utils.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vivante_utils.c b/src/vivante_utils.c index bae3221..a53459a 100644 --- a/src/vivante_utils.c +++ b/src/vivante_utils.c @@ -70,6 +70,13 @@ void __vivante_error(struct vivante *vivante, const char *fn, const char *w, int } +static gceSTATUS vivante_ioctl(struct vivante *vivante, unsigned cmd, + void *buf, size_t size) +{ + return gcoOS_DeviceControl(vivante->os, cmd, buf, size, buf, size); +} + + PixmapPtr vivante_drawable_pixmap_deltas(DrawablePtr pDrawable, int *x, int *y) { PixmapPtr pPixmap; @@ -129,8 +136,7 @@ Bool vivante_map_bo_to_gpu(struct vivante *vivante, struct drm_armada_bo *bo, map.zero = 0; map.fd = fd; - status = gcoOS_DeviceControl(vivante->os, IOC_GDMABUF_MAP, - &map, sizeof(map), &map, sizeof(map)); + status = vivante_ioctl(vivante, IOC_GDMABUF_MAP, &map, sizeof(map)); /* we don't need to keep the fd around anymore */ close(fd); |