Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cvte optimization patch set #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion os/android/iahwc2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,25 @@ HWC2::Error IAHWC2::HwcDisplay::ValidateDisplay(uint32_t *num_types,
#ifdef FORCE_ALL_DEVICE_TYPE
force_all_device_type = true;
#endif

#ifdef KVM_HWC_PROPERTY
/*
* On KVM + 4K display case, almost 30% frames are missed during video
* playback with VA-VPP composing and default CPU frequency setting.
* For optimizing video playback, disabling VA-VPP. and all layers will
* be composed in Cilent layer by SF (Only 1 plane is available on KVM)
*/
if (include_video_layer && IsKvmPlatform()) {
uint32_t kvm_config = 0;
display_->GetActiveConfig(&kvm_config);
int32_t height = 0;
display_->GetDisplayAttribute(
kvm_config, hwcomposer::HWCDisplayAttribute::kHeight, &height);
if (height > 1080) {
include_video_layer = false;
}
}
#endif
if (include_video_layer || force_all_device_type) {
for (std::pair<const hwc2_layer_t, IAHWC2::Hwc2Layer> &l : layers_) {
IAHWC2::Hwc2Layer &layer = l.second;
Expand Down Expand Up @@ -1024,7 +1043,7 @@ HWC2::Error IAHWC2::HwcDisplay::ValidateDisplay(uint32_t *num_types,
if (!avail_planes--)
break;
#ifdef KVM_HWC_PROPERTY
if (IsKvmPlatform())
if (IsKvmPlatform() && GpuDevice::getInstance().IsReservedDrmPlane())
break;
#endif
if (layers_[l.second].sf_type() == HWC2::Composition::SolidColor) {
Expand Down