diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2015-04-24 23:48:25 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-04-24 23:48:25 -0700 |
commit | 0350e3e6a066f2a4f69320e2bcf17feaf26ebe6b (patch) | |
tree | 504057d4dcc47abae61f31161fdf2391b81028d4 | |
parent | d034f4c13cd1244f493482a1f06cdba3c887214f (diff) | |
parent | cbeab9e705c284b6fb9051bfeeeaa256f75966e8 (diff) | |
download | android_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"
-rw-r--r-- | libgralloc/alloc_controller.cpp | 12 | ||||
-rw-r--r-- | libgralloc/gr.h | 2 |
2 files changed, 13 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); diff --git a/libgralloc/gr.h b/libgralloc/gr.h index 5ee0cf87f..1a10532a3 100644 --- a/libgralloc/gr.h +++ b/libgralloc/gr.h @@ -148,6 +148,8 @@ class AdrenoMemInfo : public android::Singleton <AdrenoMemInfo> ADRENOPIXELFORMAT getGpuPixelFormat(int hal_format); private: + // Overriding flag to disable UBWC alloc for graphics stack + int gfx_ubwc_disable; // Pointer to the padding library. void *libadreno_utils; |