From a0b52c6fa5815ad3a0ff4071cb3d3ba2fb175451 Mon Sep 17 00:00:00 2001
From: Peiyong Lin <lpy@google.com>
Date: Fri, 22 Jun 2018 10:37:10 -0700
Subject: [PATCH] Allow SurfaceFlinger to use Power HAL.

When we have wide color gamut content, SurfaceFlinger might want to send a
PowerHint through Power Hal to boost GPU to higher frequency, to make sure GPU
composition can finish in time.

BUG: 110112323
Test: adb shell cat /sys/class/kgsl/kgsl-3d0/devfreq/cur_freq
Change-Id: If60c13aedc4ff84eaefd3430794dc15a478c5a73
(cherry picked from commit 02be5975d6e2ec91ea02f4b4af37ff51418aa806)
---
 prebuilts/api/28.0/private/surfaceflinger.te | 1 +
 private/surfaceflinger.te                    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/prebuilts/api/28.0/private/surfaceflinger.te b/prebuilts/api/28.0/private/surfaceflinger.te
index e64b8de2c..e2f1a0721 100644
--- a/prebuilts/api/28.0/private/surfaceflinger.te
+++ b/prebuilts/api/28.0/private/surfaceflinger.te
@@ -14,6 +14,7 @@ read_runtime_log_tags(surfaceflinger)
 hal_client_domain(surfaceflinger, hal_graphics_allocator)
 hal_client_domain(surfaceflinger, hal_graphics_composer)
 hal_client_domain(surfaceflinger, hal_configstore)
+hal_client_domain(surfaceflinger, hal_power)
 allow surfaceflinger hidl_token_hwservice:hwservice_manager find;
 
 # Perform Binder IPC.
diff --git a/private/surfaceflinger.te b/private/surfaceflinger.te
index e64b8de2c..e2f1a0721 100644
--- a/private/surfaceflinger.te
+++ b/private/surfaceflinger.te
@@ -14,6 +14,7 @@ read_runtime_log_tags(surfaceflinger)
 hal_client_domain(surfaceflinger, hal_graphics_allocator)
 hal_client_domain(surfaceflinger, hal_graphics_composer)
 hal_client_domain(surfaceflinger, hal_configstore)
+hal_client_domain(surfaceflinger, hal_power)
 allow surfaceflinger hidl_token_hwservice:hwservice_manager find;
 
 # Perform Binder IPC.
-- 
GitLab