DivestOS/Patches/LineageOS-20.0/android_external_hardened_malloc/0002-Broken_Displays.patch
Tad 06254708be
Many fixes to get bluejay booting & working proper
- Enable APEX for Pixel 6/7, necessary for camera and pKVM
  - Also drop hack removing pKVM for Pixel 6/7
  - patch from GrapheneOS

- Extend hmalloc workaround to /apex

- Deblobber:
  - actually handle wildcard f/w/b overlays
  - move some stuff around
  - remove some more Pixel blobs
  - flag and disable removal of camera extensions, being able to use the second camera is nice

- Adjust what hardenDefconfig disables, caused boot issues
  minimal impact as most of these are already default-disabled
  can be narrowed down in future

- Disable some of the bionic hardening patches, causing more boot issues
  annoying to lose, but having a phone that boots is more important

- Add LTE only mode to 17.1, 18.1, 19.1, and 20.0, credit GrapheneOS

- Remove Pixel 2 ramdisk compression reverts, fixed upstream

And yes, I know I should've split up this commit...

Signed-off-by: Tad <tad@spotco.us>
2022-12-25 13:21:37 -05:00

32 lines
1007 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Tue, 22 Nov 2022 07:23:10 -0500
Subject: [PATCH] Add workaround for OnePlus 8 & 9 display driver crash
Change-Id: Ie7a0ca79bb629814e57958d57546f85030b67048
Signed-off-by: Tad <tad@spotco.us>
---
h_malloc.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/h_malloc.c b/h_malloc.c
index 3382623..3b2856e 100644
--- a/h_malloc.c
+++ b/h_malloc.c
@@ -1088,6 +1088,15 @@ COLD static void handle_bugs(void) {
ro.purge_slabs = false;
ro.region_quarantine_protect = false;
}
+
+ // OnePlus 8 & 9 display composer
+ // https://gitlab.com/divested-mobile/divestos-build/-/issues/19
+ const char hwc[] = "/vendor/bin/hw/vendor.qti.hardware.display.composer-service";
+ if (strcmp(hwc, path) == 0) {
+ ro.zero_on_free = false;
+ ro.purge_slabs = false;
+ ro.region_quarantine_protect = false;
+ }
}
COLD static void init_slow_path(void) {