summaryrefslogtreecommitdiff
path: root/merrifield/ips/tangier/TngGrallocBufferMapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'merrifield/ips/tangier/TngGrallocBufferMapper.cpp')
-rw-r--r--merrifield/ips/tangier/TngGrallocBufferMapper.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/merrifield/ips/tangier/TngGrallocBufferMapper.cpp b/merrifield/ips/tangier/TngGrallocBufferMapper.cpp
index bee4f5e..4f7eb75 100644
--- a/merrifield/ips/tangier/TngGrallocBufferMapper.cpp
+++ b/merrifield/ips/tangier/TngGrallocBufferMapper.cpp
@@ -22,10 +22,10 @@
namespace android {
namespace intel {
-TngGrallocBufferMapper::TngGrallocBufferMapper(gralloc_module_t const& module,
- DataBuffer& buffer)
+TngGrallocBufferMapper::TngGrallocBufferMapper(const hw_device_t& gralloc,
+ DataBuffer& buffer)
: GrallocBufferMapperBase(buffer),
- mGrallocModule(module),
+ mGralloc(gralloc),
mBufferObject(0)
{
CTRACE();
@@ -122,8 +122,7 @@ bool TngGrallocBufferMapper::map()
CTRACE();
// get virtual address
- err = mGrallocModule.perform(&mGrallocModule,
- GRALLOC_MODULE_GET_BUFFER_CPU_ADDRESSES_IMG,
+ err = gralloc_get_buffer_cpu_addresses_img(&mGralloc,
(buffer_handle_t)mClonedHandle,
vaddr,
size);
@@ -162,8 +161,7 @@ bool TngGrallocBufferMapper::map()
}
}
- err = mGrallocModule.perform(&mGrallocModule,
- GRALLOC_MODULE_PUT_BUFFER_CPU_ADDRESSES_IMG,
+ err = gralloc_put_buffer_cpu_addresses_img(&mGralloc,
(buffer_handle_t)mClonedHandle);
return false;
}
@@ -184,8 +182,7 @@ bool TngGrallocBufferMapper::unmap()
mSize[i] = 0;
}
- err = mGrallocModule.perform(&mGrallocModule,
- GRALLOC_MODULE_PUT_BUFFER_CPU_ADDRESSES_IMG,
+ err = gralloc_put_buffer_cpu_addresses_img(&mGralloc,
(buffer_handle_t)mClonedHandle);
if (err) {
ETRACE("failed to unmap. err = %d", err);
@@ -239,8 +236,7 @@ buffer_handle_t TngGrallocBufferMapper::getFbHandle(int subIndex)
}
// get virtual address
- err = mGrallocModule.perform(&mGrallocModule,
- GRALLOC_MODULE_GET_BUFFER_CPU_ADDRESSES_IMG,
+ err = gralloc_get_buffer_cpu_addresses_img(&mGralloc,
(buffer_handle_t)mClonedHandle,
vaddr,
size);
@@ -254,8 +250,7 @@ buffer_handle_t TngGrallocBufferMapper::getFbHandle(int subIndex)
void TngGrallocBufferMapper::putFbHandle()
{
- int err = mGrallocModule.perform(&mGrallocModule,
- GRALLOC_MODULE_PUT_BUFFER_CPU_ADDRESSES_IMG,
+ int err = gralloc_put_buffer_cpu_addresses_img(&mGralloc,
(buffer_handle_t)mClonedHandle);
if (err) {
ETRACE("failed to unmap. err = %d", err);