summaryrefslogtreecommitdiffstats
path: root/libgralloc/alloc_controller.cpp
diff options
context:
space:
mode:
authorSushil Chauhan <sushilchauhan@codeaurora.org>2015-04-30 11:05:36 -0700
committerSushil Chauhan <sushilchauhan@codeaurora.org>2015-04-30 11:05:36 -0700
commitc85b65b46e57b21f1501bba434f66aeb1d4092bb (patch)
treed5869c779ccf23bbbf6d9f5bc31a8b373115eae9 /libgralloc/alloc_controller.cpp
parentbf75d5fcaba28fc385f45ad8d65b1e9e2c233ddc (diff)
downloadhardware_qcom_display-c85b65b46e57b21f1501bba434f66aeb1d4092bb.tar.gz
hardware_qcom_display-c85b65b46e57b21f1501bba434f66aeb1d4092bb.tar.bz2
hardware_qcom_display-c85b65b46e57b21f1501bba434f66aeb1d4092bb.zip
gralloc: Fix UBWC related issues
1. Fix the missed ALIGN in getUBwcMetaBufferSize api. 2. Fix de-reference of data address pointer in getRgbDataAddress api. Change-Id: I5dae2b6f449bb9a5b0dcc23110a2efce36060a42
Diffstat (limited to 'libgralloc/alloc_controller.cpp')
-rw-r--r--libgralloc/alloc_controller.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libgralloc/alloc_controller.cpp b/libgralloc/alloc_controller.cpp
index e37cdddf7..8dcc21991 100644
--- a/libgralloc/alloc_controller.cpp
+++ b/libgralloc/alloc_controller.cpp
@@ -898,7 +898,7 @@ static unsigned int getUBwcMetaBufferSize(int width, int height, int bpp)
meta_width = ALIGN(((width + block_width - 1) / block_width), 64);
// Align meta buffer size to 4K
- size = ((meta_width * meta_height), 4096);
+ size = ALIGN((meta_width * meta_height), 4096);
return size;
}
@@ -929,7 +929,7 @@ static unsigned int getUBwcSize(int width, int height, int format,
return size;
}
-int getRgbDataAddress(private_handle_t* hnd, void* rgb_data)
+int getRgbDataAddress(private_handle_t* hnd, void** rgb_data)
{
int err = 0;
@@ -940,7 +940,7 @@ int getRgbDataAddress(private_handle_t* hnd, void* rgb_data)
// linear buffer
if (!(hnd->flags & private_handle_t::PRIV_FLAGS_UBWC_ALIGNED)) {
- rgb_data = (void*)hnd->base;
+ *rgb_data = (void*)hnd->base;
return err;
}
@@ -960,6 +960,6 @@ int getRgbDataAddress(private_handle_t* hnd, void* rgb_data)
break;
}
- rgb_data = (void*)(hnd->base + meta_size);
+ *rgb_data = (void*)(hnd->base + meta_size);
return err;
}