forked from M66B/cm10-fxp-extended
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qcom_display_heap.patch
41 lines (34 loc) · 1.31 KB
/
qcom_display_heap.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 850daa94564836dc8efcc48b02663d3a26792a81 Mon Sep 17 00:00:00 2001
From: Prabhanjan Kandula <[email protected]>
Date: Mon, 1 Oct 2012 16:40:55 +0530
Subject: [PATCH] liboverlay: Use camera heap for targets without mm heap.
for 7x30 MM heap is not available. Use camera heap instead.
CRs-fixed: 407303
Change-Id: Ie94937fb59c40b49d7f5bb30d12b4ddea497a6fc
---
liboverlay/overlayMem.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/liboverlay/overlayMem.h b/liboverlay/overlayMem.h
index dbafbbb..aaae920 100644
--- a/liboverlay/overlayMem.h
+++ b/liboverlay/overlayMem.h
@@ -38,6 +38,7 @@
#include "gralloc_priv.h"
#include "overlayUtils.h"
+#include <mdp_version.h>
namespace overlay {
@@ -143,7 +144,12 @@ inline bool OvMem::open(uint32_t numbufs,
//see if we can fallback to other heap
//we can try MM_HEAP once if it's not secure playback
if (err != 0 && !isSecure) {
+ if(qdutils::MDPVersion::getInstance().getMDPVersion() >
+ qdutils::MDP_V4_0) {
allocFlags |= GRALLOC_USAGE_PRIVATE_MM_HEAP;
+ } else {
+ allocFlags = GRALLOC_USAGE_PRIVATE_CAMERA_HEAP;
+ }
err = mAlloc->allocate(data, allocFlags, 0);
if (err != 0) {
ALOGE(" could not allocate from fallback heap");
--
1.7.10.4