summaryrefslogtreecommitdiffstats
path: root/libgralloc/alloc_controller.cpp
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2015-04-24 23:48:25 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2015-04-24 23:48:25 -0700
commit0350e3e6a066f2a4f69320e2bcf17feaf26ebe6b (patch)
tree504057d4dcc47abae61f31161fdf2391b81028d4 /libgralloc/alloc_controller.cpp
parentd034f4c13cd1244f493482a1f06cdba3c887214f (diff)
parentcbeab9e705c284b6fb9051bfeeeaa256f75966e8 (diff)
downloadandroid_hardware_qcom_display-0350e3e6a066f2a4f69320e2bcf17feaf26ebe6b.tar.gz
android_hardware_qcom_display-0350e3e6a066f2a4f69320e2bcf17feaf26ebe6b.tar.bz2
android_hardware_qcom_display-0350e3e6a066f2a4f69320e2bcf17feaf26ebe6b.zip
Merge "gralloc: Add debug.gralloc.gfx_ubwc_disable"
Diffstat (limited to 'libgralloc/alloc_controller.cpp')
-rw-r--r--libgralloc/alloc_controller.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/libgralloc/alloc_controller.cpp b/libgralloc/alloc_controller.cpp
index b8e6a6443..ea52ddf89 100644
--- a/libgralloc/alloc_controller.cpp
+++ b/libgralloc/alloc_controller.cpp
@@ -108,6 +108,16 @@ AdrenoMemInfo::AdrenoMemInfo()
*(void **)&LINK_adreno_isUBWCSupportedByGpu =
::dlsym(libadreno_utils, "isUBWCSupportedByGpu");
}
+
+ // Check if the overriding property debug.gralloc.gfx_ubwc_disable
+ // that disables UBWC allocations for the graphics stack is set
+ gfx_ubwc_disable = 0;
+ char property[PROPERTY_VALUE_MAX];
+ property_get("debug.gralloc.gfx_ubwc_disable", property, "0");
+ if(!(strncmp(property, "1", PROPERTY_VALUE_MAX)) ||
+ !(strncmp(property, "true", PROPERTY_VALUE_MAX))) {
+ gfx_ubwc_disable = 1;
+ }
}
AdrenoMemInfo::~AdrenoMemInfo()
@@ -282,7 +292,7 @@ void AdrenoMemInfo::getGpuAlignedWidthHeight(int width, int height, int format,
int AdrenoMemInfo::isUBWCSupportedByGPU(int format)
{
- if (libadreno_utils) {
+ if (!gfx_ubwc_disable && libadreno_utils) {
if (LINK_adreno_isUBWCSupportedByGpu) {
ADRENOPIXELFORMAT gpu_format = getGpuPixelFormat(format);
return LINK_adreno_isUBWCSupportedByGpu(gpu_format);