gralloc960: make fbdev fd a shallow copy
We never free private_module_t::framebuffer once it is initialized.
We can use a shallow copy of the fbdev fd.
Bug: 62222821
Test: boots
Change-Id: Id35641fa183993ce36a3c0ec7b7f4121bfdf36c4
diff --git a/gralloc960/alloc_ion.cpp b/gralloc960/alloc_ion.cpp
index 2f9efc0..954c538 100644
--- a/gralloc960/alloc_ion.cpp
+++ b/gralloc960/alloc_ion.cpp
@@ -307,7 +307,7 @@
{
struct fb_dmabuf_export fb_dma_buf;
int res;
- res = ioctl( m->framebuffer->fd, FBIOGET_DMABUF, &fb_dma_buf );
+ res = ioctl( m->framebuffer->shallow_fbdev_fd, FBIOGET_DMABUF, &fb_dma_buf );
if(res == 0)
{
hnd->share_fd = fb_dma_buf.fd;