summaryrefslogtreecommitdiff
path: root/freedreno
diff options
context:
space:
mode:
authorVarad Gautam <varadgautam@gmail.com>2015-08-21 22:14:34 +0530
committerRob Clark <robclark@freedesktop.org>2015-08-23 12:33:24 -0400
commit425c8e5af7e57d473cb94f1931baa427e58ef2f7 (patch)
treecea9b078f4fdee577aab31add2f6036c32eee2c1 /freedreno
parent857c22e5ecf016bcd15508fec6e6d435bf69b58d (diff)
freedreno: fill bo->fd when importing
Signed-off-by: Varad Gautam <varadgautam@gmail.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'freedreno')
-rw-r--r--freedreno/freedreno_bo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c
index 972ee17d..eabffe93 100644
--- a/freedreno/freedreno_bo.c
+++ b/freedreno/freedreno_bo.c
@@ -230,6 +230,7 @@ fd_bo_from_dmabuf(struct fd_device *dev, int fd)
.fd = fd,
};
int ret, size;
+ struct fd_bo *bo;
ret = drmIoctl(dev->fd, DRM_IOCTL_PRIME_FD_TO_HANDLE, &req);
if (ret) {
@@ -239,7 +240,10 @@ fd_bo_from_dmabuf(struct fd_device *dev, int fd)
/* hmm, would be nice if we had a way to figure out the size.. */
size = 0;
- return fd_bo_from_handle(dev, req.handle, size);
+ bo = fd_bo_from_handle(dev, req.handle, size);
+ bo->fd = fd;
+
+ return bo;
}
struct fd_bo * fd_bo_from_name(struct fd_device *dev, uint32_t name)