summaryrefslogtreecommitdiff
path: root/gralloc/gr_buf_mgr.cpp
diff options
context:
space:
mode:
authorTharaga Balachandran <tbalacha@codeaurora.org>2020-01-23 18:41:10 -0500
committerBaldev Sahu <bsahu@codeaurora.org>2020-05-12 09:41:37 +0530
commit576571c110b70af015b5e192de6fa148ee6b0a12 (patch)
tree87eaafc96fc257880c5fd8e4e06e0a5e918335fd /gralloc/gr_buf_mgr.cpp
parent95175bb5f9858fbc611f2bb333317ab27b61db09 (diff)
gralloc: Read debug properties in allocator process
This change resolves selinux denials caused by system processes reading vendor debug properties via gralloc. The debug properties are read and parsed in the allocator process, then propagated through the BufferManager CRs-Fixed: 2619084 Change-Id: I5175a7848cdcd2671bd16ee11721066a921f3d79
Diffstat (limited to 'gralloc/gr_buf_mgr.cpp')
-rw-r--r--gralloc/gr_buf_mgr.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gralloc/gr_buf_mgr.cpp b/gralloc/gr_buf_mgr.cpp
index 65b38649..b7554b0f 100644
--- a/gralloc/gr_buf_mgr.cpp
+++ b/gralloc/gr_buf_mgr.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018, 2020 The Linux Foundation. All rights reserved.
* Not a Contribution
*
* Copyright (C) 2010 The Android Open Source Project
@@ -32,6 +32,7 @@
#include <utility>
#include <vector>
+#include "gr_adreno_info.h"
#include "gr_buf_descriptor.h"
#include "gr_priv_handle.h"
#include "gr_utils.h"
@@ -381,6 +382,11 @@ BufferManager::~BufferManager() {
}
}
+void BufferManager::SetGrallocDebugProperties(gralloc::GrallocProperties props) {
+ allocator_->SetProperties(props);
+ AdrenoMemInfo::GetInstance()->AdrenoSetProperties(props);
+}
+
Error BufferManager::FreeBuffer(std::shared_ptr<Buffer> buf) {
auto hnd = buf->handle;
ALOGD_IF(DEBUG, "FreeBuffer handle:%p", hnd);