composer: Enable GPU based color conversion for WFD
Change-Id: Ic5e43eee5f04553c88014cece11c803db9f6901c
diff --git a/composer/hwc_display.h b/composer/hwc_display.h
index 879ad13..624750b 100644
--- a/composer/hwc_display.h
+++ b/composer/hwc_display.h
@@ -645,6 +645,7 @@
std::condition_variable cwb_cv_;
std::map<CWBClient, CWBCaptureResponse> cwb_capture_status_map_;
static constexpr unsigned int kCwbWaitMs = 100;
+ bool validate_done_ = false;
private:
bool CanSkipSdmPrepare(uint32_t *num_types, uint32_t *num_requests);
@@ -660,7 +661,6 @@
bool game_supported_ = false;
uint64_t elapse_timestamp_ = 0;
bool draw_method_set_ = false;
- bool validate_done_ = false;
bool client_target_3_1_set_ = false;
bool is_client_up_ = false;
};
diff --git a/composer/hwc_display_virtual_gpu.cpp b/composer/hwc_display_virtual_gpu.cpp
index 78fea35..139df92 100644
--- a/composer/hwc_display_virtual_gpu.cpp
+++ b/composer/hwc_display_virtual_gpu.cpp
@@ -96,7 +96,6 @@
layer_requests_.clear();
// Mark all layers to GPU if there is no need to bypass.
- bool fbt_compatible = true;
bool needs_gpu_bypass = NeedsGPUBypass() || FreezeScreen();
for (auto hwc_layer : layer_set_) {
auto layer = hwc_layer->GetSDMLayer();
@@ -121,9 +120,7 @@
*out_num_types = UINT32(layer_changes_.size());
*out_num_requests = UINT32(layer_requests_.size());;
has_client_composition_ = !needs_gpu_bypass;
-
- // FBT is compatible if all layers are compatible or gpu is bypassed.
- fbt_compatible_ = has_client_composition_ && fbt_compatible;
+ validate_done_ = true;
return ((*out_num_types > 0) ? HWC2::Error::HasChanges : HWC2::Error::None);
}
@@ -134,12 +131,9 @@
uint32_t *out_num_requests, bool *needs_commit) {
// Perform validate and commit.
auto status = Validate(out_num_types, out_num_requests);
- if (!fbt_compatible_) {
- *needs_commit = true;
- return status;
- }
- return Present(out_retire_fence);
+ *needs_commit = true;
+ return status;
}
HWC2::Error HWCDisplayVirtualGPU::SetOutputBuffer(buffer_handle_t buf,
diff --git a/composer/hwc_display_virtual_gpu.h b/composer/hwc_display_virtual_gpu.h
index 78a0873..e96d86d 100644
--- a/composer/hwc_display_virtual_gpu.h
+++ b/composer/hwc_display_virtual_gpu.h
@@ -27,6 +27,13 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/*
+ * Changes from Qualcomm Innovation Center are provided under the following license:
+ *
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * SPDX-License-Identifier: BSD-3-Clause-Clear
+ */
+
#ifndef __HWC_DISPLAY_VIRTUAL_GPU_H__
#define __HWC_DISPLAY_VIRTUAL_GPU_H__
@@ -83,7 +90,6 @@
bool disable_animation_ = false;
bool animation_in_progress_ = false;
- bool fbt_compatible_ = false;
};
} // namespace sdm