OSDN Git Service
(root)
/
android-x86
/
external-libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
425c8e5
)
freedreno: get bo size for imported dma-buf
author
Varad Gautam
<varadgautam@gmail.com>
Fri, 21 Aug 2015 16:44:35 +0000
(22:14 +0530)
committer
Rob Clark
<robclark@freedesktop.org>
Sun, 23 Aug 2015 16:33:45 +0000
(12:33 -0400)
Signed-off-by: Varad Gautam <varadgautam@gmail.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
freedreno/freedreno_bo.c
patch
|
blob
|
history
diff --git
a/freedreno/freedreno_bo.c
b/freedreno/freedreno_bo.c
index
eabffe9
..
596bfbc
100644
(file)
--- a/
freedreno/freedreno_bo.c
+++ b/
freedreno/freedreno_bo.c
@@
-237,8
+237,9
@@
fd_bo_from_dmabuf(struct fd_device *dev, int fd)
return NULL;
}
- /* hmm, would be nice if we had a way to figure out the size.. */
- size = 0;
+ /* lseek() to get bo size */
+ size = lseek(fd, 0, SEEK_END);
+ lseek(fd, 0, SEEK_CUR);
bo = fd_bo_from_handle(dev, req.handle, size);
bo->fd = fd;