diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2020-11-30 00:12:07 -0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2020-11-30 00:12:07 -0800 |
commit | 90a3488f5fc045aea2fdedb17a06cc16bc5559b2 (patch) | |
tree | 9fe4574184f4e185c627a1cfce00f622c819bf28 | |
parent | ea697e202615e65388ff913138b57138e04f61b2 (diff) | |
parent | 7e5aad28206f62ff4e809373d22174a98472ab76 (diff) |
Merge 7e5aad28206f62ff4e809373d22174a98472ab76 on remote branch
Change-Id: I8dccca61d19c6db0d9b7f4b6c92820f209afd033
-rw-r--r-- | config/display-product.mk | 2 | ||||
-rw-r--r-- | gralloc/gr_adreno_info.cpp | 7 | ||||
-rwxr-xr-x | sdm/libs/core/display_base.cpp | 14 | ||||
-rw-r--r-- | sdm/libs/core/display_base.h | 2 | ||||
-rw-r--r-- | sdm/libs/core/display_builtin.cpp | 8 | ||||
-rw-r--r-- | sdm/libs/core/drm/hw_events_drm.cpp | 2 |
6 files changed, 26 insertions, 9 deletions
diff --git a/config/display-product.mk b/config/display-product.mk index 7d65408d..9f96ac41 100644 --- a/config/display-product.mk +++ b/config/display-product.mk @@ -124,6 +124,8 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.wcg_composition_dataspa endif PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.force_hwc_copy_for_virtual_displays=true +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.max_frame_buffer_acquired_buffers=3 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.max_virtual_display_dimension=4096 ifeq ($(TARGET_BOARD_PLATFORM),$(TRINKET)) PRODUCT_PROPERTY_OVERRIDES += vendor.display.disable_excl_rect_partial_fb=1 diff --git a/gralloc/gr_adreno_info.cpp b/gralloc/gr_adreno_info.cpp index 924020ae..11516a14 100644 --- a/gralloc/gr_adreno_info.cpp +++ b/gralloc/gr_adreno_info.cpp @@ -77,6 +77,12 @@ AdrenoMemInfo::AdrenoMemInfo() { } else { ALOGE(" Failed to load libadreno_utils.so"); } + char property[PROPERTY_VALUE_MAX]; + property_get(DISABLE_UBWC_PROP, property, "0"); + if (!(strncmp(property, "1", PROPERTY_VALUE_MAX)) || + !(strncmp(property, "true", PROPERTY_VALUE_MAX))) { + gfx_ubwc_disable_ = true; + } } AdrenoMemInfo::~AdrenoMemInfo() { @@ -86,7 +92,6 @@ AdrenoMemInfo::~AdrenoMemInfo() { } void AdrenoMemInfo::AdrenoSetProperties(gralloc::GrallocProperties props) { - gfx_ubwc_disable_ = props.ubwc_disable; gfx_ahardware_buffer_disable_ = props.ahardware_buffer_disable; } diff --git a/sdm/libs/core/display_base.cpp b/sdm/libs/core/display_base.cpp index cc2855e1..8cbfbc7b 100755 --- a/sdm/libs/core/display_base.cpp +++ b/sdm/libs/core/display_base.cpp @@ -625,16 +625,18 @@ DisplayError DisplayBase::SetDisplayState(DisplayState state, bool teardown, DisablePartialUpdateOneFrame(); if (error == kErrorNone) { - if (!pending_doze_ && !pending_power_on_) { - active_ = active; - state_ = state; - } - comp_manager_->SetDisplayState(display_comp_ctx_, state, release_fence ? *release_fence : -1); // If previously requested doze state is still pending reset it on any new display state request // and handle the new request. if (state != kStateDoze) { pending_doze_ = false; } + + if (!pending_doze_ && !pending_power_on_) { + active_ = active; + state_ = state; + } + comp_manager_->SetDisplayState(display_comp_ctx_, state, release_fence ? *release_fence : -1); + // If previously requested power on state is still pending reset it on any new display state // request and handle the new request. if (state != kStateOn) { @@ -1980,7 +1982,7 @@ bool DisplayBase::IsHdrMode(const AttrVal &attr) { } bool DisplayBase::CanSkipValidate() { - return comp_manager_->CanSkipValidate(display_comp_ctx_) && !lut_swap_; + return (!is_idle_timeout_) && comp_manager_->CanSkipValidate(display_comp_ctx_) && !lut_swap_; } void DisplayBase::SetLutSwapFlag() { diff --git a/sdm/libs/core/display_base.h b/sdm/libs/core/display_base.h index 95072483..5b13bcc4 100644 --- a/sdm/libs/core/display_base.h +++ b/sdm/libs/core/display_base.h @@ -185,7 +185,7 @@ class DisplayBase : public DisplayInterface { void InsertBT2020PqHlgModes(); DisplayError HandlePendingVSyncEnable(int32_t retire_fence); DisplayError HandlePendingPowerState(int32_t retire_fence); - + bool is_idle_timeout_ = false; recursive_mutex recursive_mutex_; int32_t display_id_ = -1; DisplayType display_type_; diff --git a/sdm/libs/core/display_builtin.cpp b/sdm/libs/core/display_builtin.cpp index 4cdf9d83..fe6911fc 100644 --- a/sdm/libs/core/display_builtin.cpp +++ b/sdm/libs/core/display_builtin.cpp @@ -332,7 +332,7 @@ DisplayError DisplayBuiltIn::SetDisplayMode(uint32_t mode) { HWDisplayMode hw_display_mode = static_cast<HWDisplayMode>(mode); uint32_t pending = 0; - if (!active_) { + if (!active_ && !pending_doze_ && !pending_power_on_) { DLOGW("Invalid display state = %d. Panel must be on.", state_); return kErrorNotSupported; } @@ -466,6 +466,12 @@ DisplayError DisplayBuiltIn::SetRefreshRate(uint32_t refresh_rate, bool final_ra return error; } + if (handle_idle_timeout_) { + is_idle_timeout_ = true; + } else { + is_idle_timeout_ = false; + } + error = comp_manager_->CheckEnforceSplit(display_comp_ctx_, refresh_rate); if (error != kErrorNone) { return error; diff --git a/sdm/libs/core/drm/hw_events_drm.cpp b/sdm/libs/core/drm/hw_events_drm.cpp index 01d37476..78e57254 100644 --- a/sdm/libs/core/drm/hw_events_drm.cpp +++ b/sdm/libs/core/drm/hw_events_drm.cpp @@ -262,6 +262,8 @@ DisplayError HWEventsDRM::SetEventState(HWEvent event, bool enable, void *arg) { if (vsync_enabled_ && !vsync_registered_) { RegisterVSync(); vsync_registered_ = true; + } else if (!vsync_enabled_) { + vsync_registered_ = false; } } break; default: |