msm: mdss: share fb memory ion fd to userspace for mdp3
Add changes to share ion fd to userspace for mapping to the frame buffer memory for mdp3. Change-Id: I59c2cacde89abbd8919752c129ae8cf304208052 Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
This commit is contained in:
parent
8d0fd645ad
commit
2b1912967b
1 changed files with 10 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dma-buf.h>
|
||||
|
||||
#include "mdp3_ctrl.h"
|
||||
#include "mdp3.h"
|
||||
|
@ -1266,6 +1267,15 @@ static int mdp3_get_metadata(struct msm_fb_data_type *mfd,
|
|||
return ret;
|
||||
}
|
||||
break;
|
||||
case metadata_op_get_ion_fd:
|
||||
if (mfd->fb_ion_handle) {
|
||||
metadata->data.fbmem_ionfd =
|
||||
dma_buf_fd(mfd->fbmem_buf, 0);
|
||||
if (metadata->data.fbmem_ionfd < 0)
|
||||
pr_err("fd allocation failed. fd = %d\n",
|
||||
metadata->data.fbmem_ionfd);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pr_warn("Unsupported request to MDP GET META IOCTL.\n");
|
||||
ret = -EINVAL;
|
||||
|
|
Loading…
Add table
Reference in a new issue