summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/DisplayHardware
diff options
context:
space:
mode:
authorNaseer Ahmed <naseer@codeaurora.org>2014-08-20 16:31:58 -0400
committerJesse Hall <jessehall@google.com>2014-08-20 15:10:14 -0700
commit949ea0868de1df7e2f28a32d777cc41f901d6770 (patch)
tree7c7b3a346f8d119813d40c3c10cf6db4e154d4e0 /services/surfaceflinger/DisplayHardware
parentd4548dd0272f5a4edee1d7ff070458728848b35c (diff)
downloadframeworks_native-949ea0868de1df7e2f28a32d777cc41f901d6770.zip
frameworks_native-949ea0868de1df7e2f28a32d777cc41f901d6770.tar.gz
frameworks_native-949ea0868de1df7e2f28a32d777cc41f901d6770.tar.bz2
sf: Clear display configs when hot pluggable display is disconnected
Display configs for external displays are stored in the framework everytime we receive a hot plug to connect. However, since the configs are not cleared on disconnect, framework will just assume that the configs are valid. This does not work for use cases when you connect/disconnect external displays with different resolutions. e.g. 1080p to 4K and vice-versa With this change we clear the display configs and repopulate when we receive a hot plug to connect. Change-Id: I2eeab186a8d8668a53390a2413b2ce5e044a1845 Acked-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Diffstat (limited to 'services/surfaceflinger/DisplayHardware')
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 53409d1..bd07d24 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -799,6 +799,9 @@ void HWComposer::disconnectDisplay(int disp) {
dd.lastRetireFence = Fence::NO_FENCE;
dd.lastDisplayFence = Fence::NO_FENCE;
dd.outbufAcquireFence = Fence::NO_FENCE;
+ // clear all the previous configs and repopulate when a new
+ // device is added
+ dd.configs.clear();
}
int HWComposer::getVisualID() const {