hwc2: Flush while destroying external display.
- On external display, outstanding fences are not signaled during destroy. They get signaled only on drm_release and drm_release happen in composer restart. So need to flush external before destroying. CRs-fixed: 2187232 Change-Id: I0a7f029237cb0d8015904565c0755731a7b27212
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
58d0e0f083
commit
f86f7947e4
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
|
||||||
* Not a Contribution.
|
* Not a Contribution.
|
||||||
*
|
*
|
||||||
* Copyright 2015 The Android Open Source Project
|
* Copyright 2015 The Android Open Source Project
|
||||||
@@ -150,6 +150,10 @@ class HWCDisplay : public DisplayEventHandler {
|
|||||||
virtual int SetState(bool connected) {
|
virtual int SetState(bool connected) {
|
||||||
return kErrorNotSupported;
|
return kErrorNotSupported;
|
||||||
}
|
}
|
||||||
|
virtual DisplayError Flush() {
|
||||||
|
return kErrorNotSupported;
|
||||||
|
}
|
||||||
|
|
||||||
int SetPanelBrightness(int level);
|
int SetPanelBrightness(int level);
|
||||||
int GetPanelBrightness(int *level);
|
int GetPanelBrightness(int *level);
|
||||||
int ToggleScreenUpdates(bool enable);
|
int ToggleScreenUpdates(bool enable);
|
||||||
|
|||||||
@@ -278,4 +278,8 @@ void HWCDisplayExternal::GetUnderScanConfig() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DisplayError HWCDisplayExternal::Flush() {
|
||||||
|
return display_intf_->Flush();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace sdm
|
} // namespace sdm
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
@@ -49,6 +49,7 @@ class HWCDisplayExternal : public HWCDisplay {
|
|||||||
virtual HWC2::Error Present(int32_t *out_retire_fence);
|
virtual HWC2::Error Present(int32_t *out_retire_fence);
|
||||||
virtual void SetSecureDisplay(bool secure_display_active);
|
virtual void SetSecureDisplay(bool secure_display_active);
|
||||||
virtual int SetState(bool connected);
|
virtual int SetState(bool connected);
|
||||||
|
virtual DisplayError Flush();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HWCDisplayExternal(CoreInterface *core_intf, HWCBufferAllocator *buffer_allocator,
|
HWCDisplayExternal(CoreInterface *core_intf, HWCBufferAllocator *buffer_allocator,
|
||||||
|
|||||||
@@ -959,6 +959,10 @@ int HWCSession::DisconnectDisplay(int disp) {
|
|||||||
DLOGI("Display = %d", disp);
|
DLOGI("Display = %d", disp);
|
||||||
|
|
||||||
if (disp == HWC_DISPLAY_EXTERNAL) {
|
if (disp == HWC_DISPLAY_EXTERNAL) {
|
||||||
|
DisplayError error = hwc_display_[disp]->Flush();
|
||||||
|
if (error != kErrorNone) {
|
||||||
|
DLOGW("Flush failed. Error = %d", error);
|
||||||
|
}
|
||||||
HWCDisplayExternal::Destroy(hwc_display_[disp]);
|
HWCDisplayExternal::Destroy(hwc_display_[disp]);
|
||||||
} else if (disp == HWC_DISPLAY_VIRTUAL) {
|
} else if (disp == HWC_DISPLAY_VIRTUAL) {
|
||||||
HWCDisplayVirtual::Destroy(hwc_display_[disp]);
|
HWCDisplayVirtual::Destroy(hwc_display_[disp]);
|
||||||
|
|||||||
Reference in New Issue
Block a user