summaryrefslogtreecommitdiffstats
path: root/libgralloc/alloc_controller.cpp
diff options
context:
space:
mode:
authorSushil Chauhan <sushilchauhan@codeaurora.org>2015-04-30 17:14:37 -0700
committerSushil Chauhan <sushilchauhan@codeaurora.org>2015-05-01 10:17:29 -0700
commite61fac5be4787185c4a32a7c23289537b08d4855 (patch)
tree8ea4684229aab787957b57f90d9c1b64b51fb451 /libgralloc/alloc_controller.cpp
parentf27951d87c2ce018cc9b8f5cb17ed6924167392b (diff)
downloadandroid_hardware_qcom_display-e61fac5be4787185c4a32a7c23289537b08d4855.tar.gz
android_hardware_qcom_display-e61fac5be4787185c4a32a7c23289537b08d4855.tar.bz2
android_hardware_qcom_display-e61fac5be4787185c4a32a7c23289537b08d4855.zip
gralloc: UBWC aligned buffers are Macro Tiled
All UBWC aligned buffers are Macro tiled. Change-Id: I71bb0269d337d1ca2017ce9665010f738674f1a8
Diffstat (limited to 'libgralloc/alloc_controller.cpp')
-rw-r--r--libgralloc/alloc_controller.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/libgralloc/alloc_controller.cpp b/libgralloc/alloc_controller.cpp
index e37cdddf7..f43f64505 100644
--- a/libgralloc/alloc_controller.cpp
+++ b/libgralloc/alloc_controller.cpp
@@ -153,15 +153,17 @@ void AdrenoMemInfo::getAlignedWidthAndHeight(int width, int height, int format,
int usage, int& aligned_w, int& aligned_h)
{
+ bool ubwc_enabled = isUBwcEnabled(format, usage);
+
// Currently surface padding is only computed for RGB* surfaces.
if (format <= HAL_PIXEL_FORMAT_sRGB_X_8888) {
- int tileEnabled = isMacroTileEnabled(format, usage);
+ int tileEnabled = ubwc_enabled || isMacroTileEnabled(format, usage);
AdrenoMemInfo::getInstance().getGpuAlignedWidthHeight(width,
height, format, tileEnabled, aligned_w, aligned_h);
return;
}
- if (isUBwcEnabled(format, usage)) {
+ if (ubwc_enabled) {
getUBwcWidthAndHeight(width, height, format, aligned_w, aligned_h);
return;
}
@@ -620,9 +622,9 @@ unsigned int getBufferSizeAndDimensions(int width, int height, int format,
void getBufferAttributes(int width, int height, int format, int usage,
- int& alignedw, int &alignedh, int& tileEnabled, unsigned int& size)
+ int& alignedw, int &alignedh, int& tiled, unsigned int& size)
{
- tileEnabled = isMacroTileEnabled(format, usage);
+ tiled = isUBwcEnabled(format, usage) || isMacroTileEnabled(format, usage);
AdrenoMemInfo::getInstance().getAlignedWidthAndHeight(width,
height,