From a2cc54370a2c63ac38440f9d3e2826f4a2f08d01 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 30 Dec 2013 00:15:48 -0800 Subject: Make dumb_get_bo_from_handle() more correctly named. It doesn't take a handle (a GEM term meaning a per-DRM-fd identifier), it takes a dmabuf fd. --- src/drmmode_display.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index c533324..6134897 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -143,7 +143,8 @@ static int dumb_bo_destroy(int fd, struct dumb_bo *bo) } #ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT -static struct dumb_bo *dumb_get_bo_from_handle(int fd, int handle, int pitch, int size) +static struct dumb_bo * +dumb_get_bo_from_fd(int drm_fd, int fd, int pitch, int size) { struct dumb_bo *bo; int ret; @@ -152,7 +153,7 @@ static struct dumb_bo *dumb_get_bo_from_handle(int fd, int handle, int pitch, in if (!bo) return NULL; - ret = drmPrimeFDToHandle(fd, handle, &bo->handle); + ret = drmPrimeFDToHandle(drm_fd, fd, &bo->handle); if (ret) { free(bo); return NULL; @@ -170,7 +171,8 @@ Bool drmmode_SetSlaveBO(PixmapPtr ppix, { msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, ppix); - ppriv->backing_bo = dumb_get_bo_from_handle(drmmode->fd, fd_handle, pitch, size); + ppriv->backing_bo = dumb_get_bo_from_fd(drmmode->fd, fd_handle, + pitch, size); if (!ppriv->backing_bo) return FALSE; -- cgit v1.2.3