diff --git a/common.mk b/common.mk index 71b0fd5f..7c847cc4 100644 --- a/common.mk +++ b/common.mk @@ -7,6 +7,12 @@ display_config_version := $(shell \ display_config_version := $(shell \ if [ -d "$(TOP)/vendor/qcom/opensource/interfaces/display/config/1.7" ];\ then echo DISPLAY_CONFIG_1_7; fi) +display_config_version := $(shell \ + if [ -d "$(TOP)/vendor/qcom/opensource/interfaces/display/config/1.8" ];\ + then echo DISPLAY_CONFIG_1_8; fi) +display_config_version := $(shell \ + if [ -d "$(TOP)/vendor/qcom/opensource/interfaces/display/config/1.9" ];\ + then echo DISPLAY_CONFIG_1_9; fi) #Common C flags common_flags := -DDEBUG_CALC_FPS -Wno-missing-field-initializers @@ -25,6 +31,16 @@ ifeq ($(display_config_version), DISPLAY_CONFIG_1_7) -DDISPLAY_CONFIG_1_6 -DDISPLAY_CONFIG_1_5 -DDISPLAY_CONFIG_1_4 \ -DDISPLAY_CONFIG_1_3 -DDISPLAY_CONFIG_1_2 -DDISPLAY_CONFIG_1_1 endif +ifeq ($(display_config_version), DISPLAY_CONFIG_1_8) + common_flags += -DDISPLAY_CONFIG_1_1 -DDISPLAY_CONFIG_1_2 -DDISPLAY_CONFIG_1_3 + common_flags += -DDISPLAY_CONFIG_1_4 -DDISPLAY_CONFIG_1_5 -DDISPLAY_CONFIG_1_6 + common_flags += -DDISPLAY_CONFIG_1_7 -DDISPLAY_CONFIG_1_8 +endif +ifeq ($(display_config_version), DISPLAY_CONFIG_1_9) + common_flags += -DDISPLAY_CONFIG_1_1 -DDISPLAY_CONFIG_1_2 -DDISPLAY_CONFIG_1_3 + common_flags += -DDISPLAY_CONFIG_1_4 -DDISPLAY_CONFIG_1_5 -DDISPLAY_CONFIG_1_6 + common_flags += -DDISPLAY_CONFIG_1_7 -DDISPLAY_CONFIG_1_8 -DDISPLAY_CONFIG_1_9 +endif ifeq ($(TARGET_USES_COLOR_METADATA), true) common_flags += -DUSE_COLOR_METADATA diff --git a/sdm/libs/hwc2/Android.mk b/sdm/libs/hwc2/Android.mk index 3c8d77f3..4244eb32 100644 --- a/sdm/libs/hwc2/Android.mk +++ b/sdm/libs/hwc2/Android.mk @@ -42,6 +42,19 @@ LOCAL_SHARED_LIBRARIES += vendor.display.config@1.7 \ vendor.display.config@1.4 vendor.display.config@1.3 \ vendor.display.config@1.2 vendor.display.config@1.1 endif +ifeq ($(display_config_version), DISPLAY_CONFIG_1_8) +LOCAL_SHARED_LIBRARIES += vendor.display.config@1.1 vendor.display.config@1.2 \ + vendor.display.config@1.3 vendor.display.config@1.4 \ + vendor.display.config@1.5 vendor.display.config@1.6 \ + vendor.display.config@1.7 vendor.display.config@1.8 +endif +ifeq ($(display_config_version), DISPLAY_CONFIG_1_9) +LOCAL_SHARED_LIBRARIES += vendor.display.config@1.1 vendor.display.config@1.2 \ + vendor.display.config@1.3 vendor.display.config@1.4 \ + vendor.display.config@1.5 vendor.display.config@1.6 \ + vendor.display.config@1.7 vendor.display.config@1.8 \ + vendor.display.config@1.9 +endif LOCAL_SRC_FILES := hwc_session.cpp \ hwc_session_services.cpp \ diff --git a/sdm/libs/hwc2/hwc_session.h b/sdm/libs/hwc2/hwc_session.h index 3d052a2a..f606982a 100644 --- a/sdm/libs/hwc2/hwc_session.h +++ b/sdm/libs/hwc2/hwc_session.h @@ -20,7 +20,11 @@ #ifndef __HWC_SESSION_H__ #define __HWC_SESSION_H__ -#ifdef DISPLAY_CONFIG_1_7 +#ifdef DISPLAY_CONFIG_1_9 +#include +#elif DISPLAY_CONFIG_1_8 +#include +#elif DISPLAY_CONFIG_1_7 #include #elif DISPLAY_CONFIG_1_1 #include @@ -43,7 +47,11 @@ namespace sdm { -#ifdef DISPLAY_CONFIG_1_7 +#ifdef DISPLAY_CONFIG_1_9 +using vendor::display::config::V1_9::IDisplayConfig; +#elif DISPLAY_CONFIG_1_8 +using vendor::display::config::V1_8::IDisplayConfig; +#elif DISPLAY_CONFIG_1_7 using vendor::display::config::V1_7::IDisplayConfig; #elif DISPLAY_CONFIG_1_1 using vendor::display::config::V1_1::IDisplayConfig; @@ -253,6 +261,15 @@ class HWCSession : hwc2_device_t, HWCUEventListener, IDisplayConfig, public qCli Return getDebugProperty(const hidl_string &prop_name, getDebugProperty_cb _hidl_cb) override; #endif +#ifdef DISPLAY_CONFIG_1_8 + Return getActiveBuiltinDisplayAttributes(getDisplayAttributes_cb _hidl_cb) override; +#endif + +#ifdef DISPLAY_CONFIG_1_9 + Return setPanelLuminanceAttributes(uint32_t disp_id, float min_lum, + float max_lum) override; + Return isBuiltInDisplay(uint32_t disp_id) override; +#endif // QClient methods virtual android::status_t notifyCallback(uint32_t command, const android::Parcel *input_parcel, diff --git a/sdm/libs/hwc2/hwc_session_services.cpp b/sdm/libs/hwc2/hwc_session_services.cpp index 933ca5f3..a2b816aa 100644 --- a/sdm/libs/hwc2/hwc_session_services.cpp +++ b/sdm/libs/hwc2/hwc_session_services.cpp @@ -606,4 +606,31 @@ Return HWCSession::getDebugProperty(const hidl_string &prop_name, } #endif + +#ifdef DISPLAY_CONFIG_1_8 +Return HWCSession::getActiveBuiltinDisplayAttributes( + getDisplayAttributes_cb _hidl_cb) { + DLOGE("Not supported at present"); + return Void(); +} +#endif // DISPLAY_CONFIG_1_8 + +#ifdef DISPLAY_CONFIG_1_9 +Return HWCSession::setPanelLuminanceAttributes(uint32_t disp_id, float pan_min_lum, + float pan_max_lum) { + DLOGE("Not supported at present"); + return -1; +} + +Return HWCSession::isBuiltInDisplay(uint32_t disp_id) { + if ((HWC_DISPLAY_PRIMARY == disp_id) || (HWC_DISPLAY_BUILTIN_2 == disp_id) || + (HWC_DISPLAY_BUILTIN_3 == disp_id) || (HWC_DISPLAY_BUILTIN_4 == disp_id)) { + return true; + } + else { + return false; + } +} +#endif // DISPLAY_CONFIG_1_9 + } // namespace sdm