summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-04-29 21:09:50 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-04-29 21:09:50 -0700
commit866d379212a6aa6eb461bc9a62dabc7521ceebd5 (patch)
treec7d6b4bda9c8b5237aab3e2bab1ccb43dc72115b
parent8d9b6ddf0488cd020378a19b5dbc4a527de4ad5e (diff)
parentb2edddb0e7b5d1763a588a0e97faa1ecb3f7866d (diff)
Merge "msm: Allocate fd with O_CLOEXEC flag"
-rw-r--r--drivers/video/fbdev/msm/mdp3_ctrl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/fbdev/msm/mdp3_ctrl.c b/drivers/video/fbdev/msm/mdp3_ctrl.c
index d357a616b05e..dff8b63eea64 100644
--- a/drivers/video/fbdev/msm/mdp3_ctrl.c
+++ b/drivers/video/fbdev/msm/mdp3_ctrl.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1563,9 +1563,10 @@ static int mdp3_get_metadata(struct msm_fb_data_type *mfd,
}
break;
case metadata_op_get_ion_fd:
- if (mfd->fb_ion_handle) {
+ if (mfd->fb_ion_handle && mfd->fb_ion_client) {
metadata->data.fbmem_ionfd =
- dma_buf_fd(mfd->fbmem_buf, 0);
+ ion_share_dma_buf_fd(mfd->fb_ion_client,
+ mfd->fb_ion_handle);
if (metadata->data.fbmem_ionfd < 0)
pr_err("fd allocation failed. fd = %d\n",
metadata->data.fbmem_ionfd);