summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 992e2af)
raw | patch | inline | side by side (parent: 992e2af)
author | Rob Clark <rob@ti.com> | |
Mon, 11 Jun 2012 13:52:24 +0000 (08:52 -0500) | ||
committer | Rob Clark <rob@ti.com> | |
Fri, 13 Jul 2012 21:16:46 +0000 (16:16 -0500) |
Signed-off-by: Rob Clark <rob@ti.com>
omap/omap_drm.c | patch | blob | history |
diff --git a/omap/omap_drm.c b/omap/omap_drm.c
index 336da115ae1a9d70210130f8f126df180600fbe6..464dea9cc5a33a97f74725d883b09104351233d5 100644 (file)
--- a/omap/omap_drm.c
+++ b/omap/omap_drm.c
#include <errno.h>
#include <sys/mman.h>
#include <fcntl.h>
+#include <unistd.h>
#include <xf86drm.h>
munmap(bo->map, bo->size);
}
+ if (bo->fd) {
+ close(bo->fd);
+ }
+
if (bo->handle) {
struct drm_gem_close req = {
.handle = bo->handle,
return bo->handle;
}
+/* caller owns the dmabuf fd that is returned and is responsible
+ * to close() it when done
+ */
int omap_bo_dmabuf(struct omap_bo *bo)
{
if (!bo->fd) {
bo->fd = req.fd;
}
- return bo->fd;
+ return dup(bo->fd);
}
uint32_t omap_bo_size(struct omap_bo *bo)