summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 };