mediatek: Open restricted_mtk_cma in O_RDONLY
The write permission for restricted_mtk_cma is unnecessary. Bug: 433330646 Test: allocate a buffer with GRALLOC_USAGE_PROTECTED usage Flag: EXEMPT: desktop-only change Change-Id: Id99a0e03f2e1c7cbb9f15596316dd21aaebdf4a3
This commit is contained in:
parent
c785301bd3
commit
a3dd421100
1 changed files with 1 additions and 1 deletions
|
|
@ -143,7 +143,7 @@ static int mediatek_init(struct driver *drv)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAS_DMABUF_SYSTEM_HEAP)
|
#if defined(HAS_DMABUF_SYSTEM_HEAP)
|
||||||
priv->dma_heap_fd = open("/dev/dma_heap/restricted_mtk_cma", O_RDWR | O_CLOEXEC);
|
priv->dma_heap_fd = open("/dev/dma_heap/restricted_mtk_cma", O_RDONLY | O_CLOEXEC);
|
||||||
if (priv->dma_heap_fd < 0) {
|
if (priv->dma_heap_fd < 0) {
|
||||||
drv_loge("Failed opening secure CMA heap errno=%d\n", -errno);
|
drv_loge("Failed opening secure CMA heap errno=%d\n", -errno);
|
||||||
protected = 0;
|
protected = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue