summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <jstultz@google.com>2022-04-06 21:50:14 +0000
committerJohn Stultz <jstultz@google.com>2022-04-06 21:58:54 +0000
commit82475270f486fba353dbe72ade10b802b7ec0e23 (patch)
treedc6a73a3c5a6d64cb3c9a915672eca7d079cc359
parentdffef568273467477d28893875eeb939f8f71f21 (diff)
downloadminigbm-82475270f486fba353dbe72ade10b802b7ec0e23.tar.gz
minigbm: Add HAS_DMABUF_SYSTEM_HEAP to the msm build target
After commit db3c6fcf0228 ("gralloc: Hide dmabuf heap allocator behind of a flag") landed, db845c started seeing boot failures and the following sepolicy denials in the logcat: allocator@4.0-s: type=1400 audit(0.0:446): avc: denied { read write } for path=2F6D656D66643A7072696D6553686164657243616368655F64737420726573657276656420726567696F6E202864656C6574656429 dev="tmpfs" ino=1378 scontext=u:r:surfaceflinger:s0 tcontext=u:object_r:hal_graphics_allocator_default_tmpfs:s0 tclass=file permissive=0 It seems disabling the the libdmabufheap allocator and falling back to memfd is causing sepolicy troulbe which blocks allocations from working. This patch adds -DHAS_DMABUF_SYSTEM_HEAP to the libminigbm_gralloc_msm target, which resolves the issue. However its not clear if this is the best solution, as I suspect other devices (_meson, etc) may also need this fix. Fixes: db3c6fcf0228 ("gralloc: Hide dmabuf heap allocator behind of a flag") Signed-off-by: John Stultz <jstultz@google.com> Change-Id: Id93c431ac3a449fc7057bec8dff82356b0668153
-rw-r--r--Android.bp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 819d105..e2d74d2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -238,6 +238,7 @@ cc_library_shared {
cflags: [
"-DDRV_MSM",
"-DQCOM_DISABLE_COMPRESSED_NV12",
+ "-DHAS_DMABUF_SYSTEM_HEAP",
],
}