freedreno: get bo size for imported dma-buf
Signed-off-by: Varad Gautam <varadgautam@gmail.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>main
parent
425c8e5af7
commit
1eba47a763
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue