summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2017-11-01 18:58:15 -0700
committerAlistair Strachan <astrachan@google.com>2018-09-05 17:32:33 +0000
commit6dc5ce5dbcd79e6fb6abb157e24b381d4f09d04a (patch)
tree790c1f964f721b27d4442a4eff3c8d881d310a75
parent724d2fb9d8aaeab5dc317b134880bd4e48556dfd (diff)
downloadhikey-6dc5ce5dbcd79e6fb6abb157e24b381d4f09d04a.tar.gz
hikey/hikey960: Enable drm_hwcomposer for 4.14+ kernels
Modifications needed to enable the drm_hwcomposer in the hikey build. This enables drm_hwcomposer for 4.14+ on HiKey and HiKey960 This requires updated drm_hwc source and changes to the kernel source and 4.14 kernel prebuilt to be updated (and merged together with this change). So DO NOT MERGE until pre-built kernel which incldues the following commits is submitted: https://android-review.googlesource.com/c/kernel/hikey-linaro/+/743923 As well as the following update to drm_hwcomposer: https://android-review.googlesource.com/c/platform/external/drm_hwcomposer/+/743902 Bug: 62066689 Change-Id: Ifbe76eed77672d06ceb3bce16de4b4d8cac56f17 Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r--device-common.mk5
-rw-r--r--hikey-common.mk7
-rw-r--r--hikey960.mk6
-rw-r--r--init.common.rc1
-rw-r--r--sepolicy/hal_graphics_composer_default.te1
5 files changed, 20 insertions, 0 deletions
diff --git a/device-common.mk b/device-common.mk
index e0927644..12312bdd 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -62,6 +62,11 @@ PRODUCT_PACKAGES += \
android.hardware.graphics.composer@2.1-service \
android.hardware.graphics.mapper@2.0-impl
+ifeq ($(HIKEY_USE_DRM_HWCOMPOSER), true)
+ BOARD_USES_DRM_HWCOMPOSER := true
+ PRODUCT_PACKAGES += hwcomposer.drm
+endif
+
# Memtrack
PRODUCT_PACKAGES += memtrack.default \
android.hardware.memtrack@1.0-service \
diff --git a/hikey-common.mk b/hikey-common.mk
index 1927fcf6..5dca9d5c 100644
--- a/hikey-common.mk
+++ b/hikey-common.mk
@@ -7,6 +7,8 @@ ifndef TARGET_COMPRESSED_KERNEL
TARGET_COMPRESSED_KERNEL=true
endif
+HIKEY_USE_DRM_HWCOMPOSER := false
+
ifeq ($(TARGET_COMPRESSED_KERNEL), false)
TARGET_PREBUILT_KERNEL := device/linaro/hikey-kernel/Image-dtb-$(TARGET_KERNEL_USE)
else
@@ -25,6 +27,11 @@ else
HIKEY_USE_LEGACY_TI_BLUETOOTH := true
else
HIKEY_USE_LEGACY_TI_BLUETOOTH := false
+ ifeq ($(TARGET_KERNEL_USE), 4.9)
+ HIKEY_USE_DRM_HWCOMPOSER := false
+ else
+ HIKEY_USE_DRM_HWCOMPOSER := true
+ endif
endif
TARGET_FSTAB := fstab.hikey
endif
diff --git a/hikey960.mk b/hikey960.mk
index 3666ec35..57ef5a4e 100644
--- a/hikey960.mk
+++ b/hikey960.mk
@@ -5,8 +5,14 @@ TARGET_PREBUILT_KERNEL := device/linaro/hikey-kernel/Image.gz-dtb-hikey960-$(TAR
TARGET_PREBUILT_DTB := device/linaro/hikey-kernel/hi3660-hikey960.dtb-$(TARGET_KERNEL_USE)
ifeq ($(TARGET_KERNEL_USE), 4.4)
+ HIKEY_USE_DRM_HWCOMPOSER := false
HIKEY_USE_LEGACY_TI_BLUETOOTH := true
else
+ ifeq ($(TARGET_KERNEL_USE), 4.9)
+ HIKEY_USE_DRM_HWCOMPOSER := false
+ else
+ HIKEY_USE_DRM_HWCOMPOSER := true
+ endif
HIKEY_USE_LEGACY_TI_BLUETOOTH := false
endif
diff --git a/init.common.rc b/init.common.rc
index c15b29dd..cb8abb79 100644
--- a/init.common.rc
+++ b/init.common.rc
@@ -54,6 +54,7 @@ on post-fs
# Set supported opengles version
setprop ro.opengles.version 196608
+ setprop ro.hardware.hwcomposer drm
# If an app forces screen rotation, revert it once the apps closes
setprop persist.demo.rotationlock 1
diff --git a/sepolicy/hal_graphics_composer_default.te b/sepolicy/hal_graphics_composer_default.te
index d7715de2..9c310f6b 100644
--- a/sepolicy/hal_graphics_composer_default.te
+++ b/sepolicy/hal_graphics_composer_default.te
@@ -1,2 +1,3 @@
vndbinder_use(hal_graphics_composer_default)
+allow hal_graphics_composer_default self:netlink_kobject_uevent_socket { bind create read };