diff options
author | Pullakavi Srinivas <quic_spullaka@quicinc.com> | 2022-08-06 11:33:39 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2022-08-16 02:40:14 -0700 |
commit | 12b8bb2fda0a521e17ab9081071bac7196d9331a (patch) | |
tree | 78c3d7df29d881ef7b44fc612ab2264e1e29f1f5 | |
parent | d5ea2493fd6dd016a91bd3b71a3df5c978bfd18e (diff) |
hwc: Fix wfd enable flag for Android-T.
CRs-Fixed: 3261365
Change-Id: Ibdfef3729270ba9e411cc1ee0e060df3470a596a
-rw-r--r-- | composer/hwc_session.cpp | 18 | ||||
-rw-r--r-- | composer/hwc_session.h | 4 | ||||
-rw-r--r-- | composer/hwc_session_services.cpp | 2 | ||||
-rw-r--r-- | config/display-product.mk | 12 | ||||
-rw-r--r-- | include/display_properties.h | 4 | ||||
-rw-r--r-- | init/init.qti.display_boot.sh | 2 |
6 files changed, 25 insertions, 17 deletions
diff --git a/composer/hwc_session.cpp b/composer/hwc_session.cpp index 6621a7a6..2fe02c7e 100644 --- a/composer/hwc_session.cpp +++ b/composer/hwc_session.cpp @@ -263,14 +263,14 @@ int HWCSession::Init() { DLOGI("async_vds_creation: %d", async_vds_creation_); value = 0; - Debug::Get()->GetProperty(DISABLE_VDS_HWC, &value); - disable_vds_hwc_ = (value == 1); - DLOGI("disable_vds_hwc: %d", disable_vds_hwc_); + Debug::Get()->GetProperty(DISABLE_NON_WFD_VDS, &value); + disable_non_wfd_vds_ = (value == 1); + DLOGI("disable_non_wfd_vds: %d", disable_non_wfd_vds_); - value = 0; - Debug::Get()->GetProperty(VDS_ALLOW_HWC, &value); - vds_allow_hwc_ = (value == 1); - DLOGI("vds_allow_hwc: %d", vds_allow_hwc_); + char prop_str[64] = {}; + Debug::Get()->GetProperty(ENABLE_HWC_VDS, prop_str); + debug_enable_hwc_vds_ = (strcmp(prop_str, "true") == 0); + DLOGI("debug_enable_hwc_vds: %d", debug_enable_hwc_vds_); DLOGI("Initializing supported display slots"); InitSupportedDisplaySlots(); @@ -631,11 +631,11 @@ void HWCSession::Dump(uint32_t *out_size, char *out_buffer) { } uint32_t HWCSession::GetMaxVirtualDisplayCount() { - if (!disable_vds_hwc_) { + if (!disable_non_wfd_vds_) { return map_info_virtual_.size(); } - return is_client_up_ && !vds_allow_hwc_ ? map_info_virtual_.size() : 0; + return is_client_up_ && !debug_enable_hwc_vds_ ? map_info_virtual_.size() : 0; } int32_t HWCSession::GetActiveConfig(hwc2_display_t display, hwc2_config_t *out_config) { diff --git a/composer/hwc_session.h b/composer/hwc_session.h index 72d1d59f..e0c6d9d1 100644 --- a/composer/hwc_session.h +++ b/composer/hwc_session.h @@ -706,8 +706,8 @@ class HWCSession : hwc2_device_t, HWCUEventListener, public qClient::BnQClient, std::shared_ptr<IPCIntf> ipc_intf_ = nullptr; bool primary_pending_ = true; Locker primary_display_lock_; - bool disable_vds_hwc_ = false; - bool vds_allow_hwc_ = false; + bool disable_non_wfd_vds_ = false; + bool debug_enable_hwc_vds_ = false; bool tui_start_success_ = false; std::future<int> commit_done_future_; }; diff --git a/composer/hwc_session_services.cpp b/composer/hwc_session_services.cpp index bc375b33..da33edd8 100644 --- a/composer/hwc_session_services.cpp +++ b/composer/hwc_session_services.cpp @@ -1398,7 +1398,7 @@ int HWCSession::DisplayConfigImpl::IsSmartPanelConfig(uint32_t disp_id, uint32_t } int HWCSession::DisplayConfigImpl::IsAsyncVDSCreationSupported(bool *supported) { - if(hwc_session_->disable_vds_hwc_ && hwc_session_->vds_allow_hwc_) { + if(hwc_session_->disable_non_wfd_vds_ && hwc_session_->debug_enable_hwc_vds_) { *supported = false; return 0; } diff --git a/config/display-product.mk b/config/display-product.mk index eece81cc..e50e0c73 100644 --- a/config/display-product.mk +++ b/config/display-product.mk @@ -100,10 +100,8 @@ PRODUCT_PROPERTY_OVERRIDES += \ debug.sf.high_fps_early_gl_phase_offset_ns=-2000000 \ debug.sf.disable_client_composition_cache=1 \ debug.sf.enable_gl_backpressure=1 \ - debug.sf.enable_hwc_vds=1 \ debug.sf.enable_advanced_sf_phase_offset=1 \ debug.sf.predict_hwc_composition_strategy=0 \ - vendor.display.vds_allow_hwc=0 \ vendor.display.enable_async_vds_creation=1 \ vendor.display.enable_rounded_corner=1 \ vendor.display.disable_3d_adaptive_tm=1 \ @@ -135,6 +133,16 @@ ifneq ($(PLATFORM_VERSION), 10) PRODUCT_PROPERTY_OVERRIDES += vendor.display.enable_async_powermode=0 endif +ifeq ($(TARGET_BOARD_PLATFORM),parrot) +PRODUCT_PROPERTY_OVERRIDES += \ + debug.sf.enable_hwc_vds=false \ + vendor.display.vds_allow_hwc=true +else +PRODUCT_PROPERTY_OVERRIDES += \ + debug.sf.enable_hwc_vds=1 \ + vendor.display.vds_allow_hwc=0 +endif + #Set WCG properties PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_wide_color_display=true PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_HDR_display=true diff --git a/include/display_properties.h b/include/display_properties.h index 6ba2e399..d6c1ff90 100644 --- a/include/display_properties.h +++ b/include/display_properties.h @@ -150,8 +150,6 @@ #define ENABLE_FORCE_SPLIT DISPLAY_PROP("enable_force_split") #define DISABLE_GPU_COLOR_CONVERT DISPLAY_PROP("disable_gpu_color_convert") #define ENABLE_ASYNC_VDS_CREATION DISPLAY_PROP("enable_async_vds_creation") -#define VDS_ALLOW_HWC DISPLAY_PROP("vds_allow_hwc") -#define DISABLE_VDS_HWC DISPLAY_PROP("disable_vds_hwc") #define ENABLE_HISTOGRAM_INTR DISPLAY_PROP("enable_hist_intr") #define DISABLE_MMRM_PROP DISPLAY_PROP("disable_mmrm_prop") #define DEFER_FPS_FRAME_COUNT DISPLAY_PROP("defer_fps_frame_count") @@ -214,6 +212,8 @@ // Add all persist.vendor.display.properties above #define ZERO_SWAP_INTERVAL "vendor.debug.egl.swapinterval" +#define ENABLE_HWC_VDS "debug.sf.enable_hwc_vds" +#define DISABLE_NON_WFD_VDS DISPLAY_PROP("disable_non_wfd_vds") #define WINDOW_RECT_PROP DISPLAY_PROP("window_rect") #define WINDOW_RECT_PROP_SECONDARY DISPLAY_PROP("window_rect_secondary") #define ENABLE_WINDOW_RECT_MASK DISPLAY_PROP("enable_window_rect_mask") diff --git a/init/init.qti.display_boot.sh b/init/init.qti.display_boot.sh index 3e2eb0d4..cc069145 100644 --- a/init/init.qti.display_boot.sh +++ b/init/init.qti.display_boot.sh @@ -140,7 +140,7 @@ case "$target" in setprop vendor.display.disable_mitigated_fps 1 setprop vendor.display.secure_preview_buffer_format 420_sp setprop vendor.gralloc.secure_preview_buffer_format 420_sp - setprop vendor.display.disable_vds_hwc 1 + setprop vendor.display.disable_non_wfd_vds 1 ;; esac ;; |