author | Stark Li <stark.li@amlogic.com> | 2017-02-27 02:52:23 (GMT) |
---|---|---|
committer | Stark Li <stark.li@amlogic.com> | 2017-02-27 02:53:52 (GMT) |
commit | 86aa61aa91c0c771488f921d1cc280f05d4c6f30 (patch) | |
tree | 0fbd2fd2f920edca382f2999ee333fe167f68732 | |
parent | e3d6050d03459ea5c9069a3a75427735df7facc9 (diff) | |
download | gralloc-86aa61aa91c0c771488f921d1cc280f05d4c6f30.zip gralloc-86aa61aa91c0c771488f921d1cc280f05d4c6f30.tar.gz gralloc-86aa61aa91c0c771488f921d1cc280f05d4c6f30.tar.bz2 |
PD#138788: compile error on l
Change-Id: I0fcad7898b3ec3437c33bc37e8debd3e33aef9aa
-rw-r--r-- | alloc_ion.cpp | 2 | ||||
-rw-r--r-- | framebuffer.cpp | 28 | ||||
-rw-r--r-- | framebuffer.h | 3 |
3 files changed, 2 insertions, 31 deletions
diff --git a/alloc_ion.cpp b/alloc_ion.cpp index 09692e9..4969032 100644 --- a/alloc_ion.cpp +++ b/alloc_ion.cpp @@ -50,10 +50,12 @@ int alloc_backend_alloc(alloc_device_t* dev, size_t size, int usage, buffer_hand #define ION_HEAP_SECURE_MASK 1 bool secureOrProtectedLayer = false; +#ifdef GRALLOC_ENABLE_SECURE_LAYER if (usage & GRALLOC_USAGE_AML_SECURE) { secureOrProtectedLayer = true; } +#endif if (usage & GRALLOC_USAGE_PROTECTED) { diff --git a/framebuffer.cpp b/framebuffer.cpp index fb49af4..e4b7669 100644 --- a/framebuffer.cpp +++ b/framebuffer.cpp @@ -530,34 +530,6 @@ int fb_post_with_fence_locked( return sync_req.out_fen_fd; } -uint32_t getIonPhyAddr(struct framebuffer_info_t* fbinfo,buffer_handle_t hnd) -{ - private_handle_t const *pHandle = reinterpret_cast<private_handle_t const*> (hnd); - private_module_t *grallocModule = fbinfo->grallocModule; - int result = 0; - struct meson_phys_data phyData = - { - .handle = pHandle->share_fd, - .phys_addr = 0, - .size = 0, - }; - struct ion_custom_data customData = - { - .cmd = ION_IOC_MESON_PHYS_ADDR, - .arg = (unsigned long)&phyData, - }; - - result = ioctl(grallocModule->ion_client, ION_IOC_CUSTOM, (unsigned long)&customData); - - if (result < 0) - { - ALOGE("ion custom ioctl %x failed with code %d: %s\n", - ION_IOC_MESON_PHYS_ADDR, result, strerror(errno)); - } - - return phyData.phys_addr; -} - int hwc_fb_post_with_fence_locked( struct framebuffer_info_t* fbinfo, buffer_handle_t hnd, diff --git a/framebuffer.h b/framebuffer.h index e2ede83..c25af9b 100644 --- a/framebuffer.h +++ b/framebuffer.h @@ -52,9 +52,6 @@ struct meson_phys_data{ unsigned int size; }; -// get ion physical address. -uint32_t getIonPhyAddr(struct framebuffer_info_t* fbinfo, buffer_handle_t hnd); - // Initialize the framebuffer (must keep module lock before calling int init_frame_buffer_locked(struct framebuffer_info_t* info); |