From: Sundar Raman Date: Fri, 26 Jul 2013 14:34:26 +0000 (-0500) Subject: gpu: ion: fix omap_ion_share_fd_to_buffers api X-Git-Tag: android-3.8-6AJ.1.1~17^2^2~3 X-Git-Url: https://git.ti.com/gitweb?p=android-sdk%2Fkernel-video.git;a=commitdiff_plain;h=3d84b522bf60b9dae8215b85f641a690f89fa652;ds=sidebyside gpu: ion: fix omap_ion_share_fd_to_buffers api the output value from ion_share_dma_buf is a dma buf fd buffers array was filled mistakenly as the code was ported from k3.4 where the equivalent function ion_share used to return pointer to ion_buffer. updated the code to upref using ion_share_dma_buf() and get the handle to buffer using ion_handle_buffer(). Change-Id: I3bb39f918a9dde8ee78ffa3adcab447589295fdf Signed-off-by: Sundar Raman --- diff --git a/drivers/gpu/ion/omap/omap_ion.c b/drivers/gpu/ion/omap/omap_ion.c index 886dd6f8133..df8f3818653 100755 --- a/drivers/gpu/ion/omap/omap_ion.c +++ b/drivers/gpu/ion/omap/omap_ion.c @@ -292,7 +292,8 @@ int omap_ion_share_fd_to_buffers(int fd, struct ion_buffer **buffers, for (i = 0; i < *num_handles; i++) { if (handles[i]) - buffers[i] = ion_share_dma_buf(client, handles[i]); + share_fd = ion_share_dma_buf(client, handles[i]); + buffers[i] = ion_handle_buffer(handles[i]); } exit: