summaryrefslogtreecommitdiff
path: root/gralloc
diff options
context:
space:
mode:
Diffstat (limited to 'gralloc')
-rw-r--r--gralloc/gr_adreno_info.cpp4
-rw-r--r--gralloc/gr_buf_mgr.cpp2
-rw-r--r--gralloc/gralloc_priv.h7
3 files changed, 10 insertions, 3 deletions
diff --git a/gralloc/gr_adreno_info.cpp b/gralloc/gr_adreno_info.cpp
index ca77b3be..6288a2ab 100644
--- a/gralloc/gr_adreno_info.cpp
+++ b/gralloc/gr_adreno_info.cpp
@@ -75,13 +75,13 @@ AdrenoMemInfo::AdrenoMemInfo() {
// Check if the overriding property debug.gralloc.gfx_ubwc_disable
// that disables UBWC allocations for the graphics stack is set
char property[PROPERTY_VALUE_MAX];
- property_get("debug.gralloc.gfx_ubwc_disable", property, "0");
+ property_get(DISABLE_UBWC_PROP, property, "0");
if (!(strncmp(property, "1", PROPERTY_VALUE_MAX)) ||
!(strncmp(property, "true", PROPERTY_VALUE_MAX))) {
gfx_ubwc_disable_ = true;
}
- if ((property_get("debug.gralloc.map_fb_memory", property, NULL) > 0) &&
+ if ((property_get(MAP_FB_MEMORY_PROP, property, NULL) > 0) &&
(!strncmp(property, "1", PROPERTY_VALUE_MAX) ||
(!strncasecmp(property, "true", PROPERTY_VALUE_MAX)))) {
map_fb_ = true;
diff --git a/gralloc/gr_buf_mgr.cpp b/gralloc/gr_buf_mgr.cpp
index 77ac2cbc..21ebdcae 100644
--- a/gralloc/gr_buf_mgr.cpp
+++ b/gralloc/gr_buf_mgr.cpp
@@ -41,7 +41,7 @@ BufferManager::BufferManager() : next_id_(0) {
char property[PROPERTY_VALUE_MAX];
// Map framebuffer memory
- if ((property_get("debug.gralloc.map_fb_memory", property, NULL) > 0) &&
+ if ((property_get(MAP_FB_MEMORY_PROP, property, NULL) > 0) &&
(!strncmp(property, "1", PROPERTY_VALUE_MAX) ||
(!strncasecmp(property, "true", PROPERTY_VALUE_MAX)))) {
map_fb_mem_ = true;
diff --git a/gralloc/gralloc_priv.h b/gralloc/gralloc_priv.h
index 73eacaa1..1abf73bc 100644
--- a/gralloc/gralloc_priv.h
+++ b/gralloc/gralloc_priv.h
@@ -24,6 +24,13 @@
#include <unistd.h>
#include "gr_priv_handle.h"
+#define GRALLOC_PROP_PREFIX "vendor.gralloc."
+#define GRALLOC_PROP(prop_name) GRALLOC_PROP_PREFIX prop_name
+
+#define DISABLE_UBWC_PROP GRALLOC_PROP("disable_ubwc")
+#define ENABLE_FB_UBWC_PROP GRALLOC_PROP("enable_fb_ubwc")
+#define MAP_FB_MEMORY_PROP GRALLOC_PROP("map_fb_memory")
+
#define ROUND_UP_PAGESIZE(x) roundUpToPageSize(x)
inline int roundUpToPageSize(int x) {
return (x + (getpagesize() - 1)) & ~(getpagesize() - 1);