summaryrefslogtreecommitdiff
path: root/composer/hwc_display.h
diff options
context:
space:
mode:
Diffstat (limited to 'composer/hwc_display.h')
-rw-r--r--composer/hwc_display.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/composer/hwc_display.h b/composer/hwc_display.h
index 6e65745e..9bcb581a 100644
--- a/composer/hwc_display.h
+++ b/composer/hwc_display.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2021, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright 2015 The Android Open Source Project
@@ -44,7 +44,7 @@
#include "hwc_buffer_sync_handler.h"
using android::hardware::graphics::common::V1_2::ColorMode;
-using android::hardware::graphics::common::V1_1::Dataspace;
+using android::hardware::graphics::common::V1_2::Dataspace;
using android::hardware::graphics::common::V1_1::RenderIntent;
using android::hardware::graphics::common::V1_2::Hdr;
namespace composer_V2_4 = ::android::hardware::graphics::composer::V2_4;
@@ -52,6 +52,7 @@ using HwcAttribute = composer_V2_4::IComposerClient::Attribute;
using VsyncPeriodChangeConstraints = composer_V2_4::IComposerClient::VsyncPeriodChangeConstraints;
using VsyncPeriodChangeTimeline = composer_V2_4::VsyncPeriodChangeTimeline;
using VsyncPeriodNanos = composer_V2_4::VsyncPeriodNanos;
+using ClientTargetProperty = composer_V2_4::IComposerClient::ClientTargetProperty;
namespace sdm {
@@ -167,7 +168,7 @@ class HWCDisplay : public DisplayEventHandler {
virtual int Deinit();
// Framebuffer configurations
- virtual void SetIdleTimeoutMs(uint32_t timeout_ms);
+ virtual void SetIdleTimeoutMs(uint32_t timeout_ms, uint32_t inactive_ms);
virtual HWC2::Error SetFrameDumpConfig(uint32_t count, uint32_t bit_mask_layer_type,
int32_t format, bool post_processed);
virtual DisplayError SetMaxMixerStages(uint32_t max_mixer_stages);
@@ -203,7 +204,7 @@ class HWCDisplay : public DisplayEventHandler {
// 0 : Success.
virtual int GetFrameCaptureStatus() { return -EAGAIN; }
- virtual DisplayError SetDetailEnhancerConfig(const DisplayDetailEnhancerData &de_data) {
+ virtual DisplayError SetHWDetailedEnhancerConfig(void *params) {
return kErrorNotSupported;
}
virtual HWC2::Error SetReadbackBuffer(const native_handle_t *buffer,
@@ -232,6 +233,11 @@ class HWCDisplay : public DisplayEventHandler {
return false;
}
+ virtual bool VsyncEnablePending() {
+ return false;
+ }
+
+ virtual void SetCpuPerfHintLargeCompCycle() {};
// Display Configurations
static uint32_t GetThrottlingRefreshRate() { return HWCDisplay::throttling_refresh_rate_; }
static void SetThrottlingRefreshRate(uint32_t newRefreshRate)
@@ -244,6 +250,9 @@ class HWCDisplay : public DisplayEventHandler {
virtual int SetState(bool connected) {
return kErrorNotSupported;
}
+ virtual DisplayError SetStandByMode(bool enable, bool is_twm) {
+ return kErrorNotSupported;
+ }
virtual DisplayError Flush() {
return kErrorNotSupported;
}
@@ -287,6 +296,8 @@ class HWCDisplay : public DisplayEventHandler {
}
virtual HWC2::Error SetClientTarget(buffer_handle_t target, shared_ptr<Fence> acquire_fence,
int32_t dataspace, hwc_region_t damage);
+ virtual HWC2::Error GetClientTarget(buffer_handle_t target, shared_ptr<Fence> acquire_fence,
+ int32_t dataspace, hwc_region_t damage);
virtual HWC2::Error SetColorMode(ColorMode mode) { return HWC2::Error::Unsupported; }
virtual HWC2::Error SetColorModeWithRenderIntent(ColorMode mode, RenderIntent intent) {
return HWC2::Error::Unsupported;
@@ -411,12 +422,19 @@ class HWCDisplay : public DisplayEventHandler {
uint64_t *samples[NUM_HISTOGRAM_COLOR_COMPONENTS]);
virtual HWC2::Error GetDisplayVsyncPeriod(VsyncPeriodNanos *vsync_period);
+ virtual HWC2::Error SetDisplayVsyncPeriod(VsyncPeriodNanos vsync_period) {
+ return HWC2::Error::None;
+ }
+
+
virtual HWC2::Error SetActiveConfigWithConstraints(
hwc2_config_t config, const VsyncPeriodChangeConstraints *vsync_period_change_constraints,
VsyncPeriodChangeTimeline *out_timeline);
HWC2::Error SetDisplayElapseTime(uint64_t time);
virtual bool HasReadBackBufferSupport() { return false; }
+ virtual bool IsDisplayIdle() { return false; };
+ virtual HWC2::Error GetClientTargetProperty(ClientTargetProperty *out_client_target_property);
protected:
static uint32_t throttling_refresh_rate_;
@@ -524,6 +542,7 @@ class HWCDisplay : public DisplayEventHandler {
bool client_connected_ = true;
bool pending_config_ = false;
bool has_client_composition_ = false;
+ bool smart_panel_config_ = false;
uint32_t vsyncs_to_apply_rate_change_ = 1;
hwc2_config_t pending_refresh_rate_config_ = UINT_MAX;
int64_t pending_refresh_rate_refresh_time_ = INT64_MAX;
@@ -536,6 +555,12 @@ class HWCDisplay : public DisplayEventHandler {
bool windowed_display_ = false;
uint32_t active_refresh_rate_ = 0;
bool animating_ = false;
+ buffer_handle_t client_target_handle_ = 0;
+ shared_ptr<Fence> client_acquire_fence_ = nullptr;
+ int32_t client_dataspace_ = 0;
+ hwc_region_t client_damage_region_ = {};
+ bool display_idle_ = false;
+ bool enable_poms_during_doze_ = false;
private:
void DumpInputBuffers(void);