summaryrefslogtreecommitdiff
path: root/sdm/libs/core/fb/hw_device.cpp
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-08-09 12:33:01 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-09 12:33:01 -0700
commitd01eb7b89e772b1600d2095523a2dc5dd4fa7558 (patch)
tree2c03e59e3718b20a1c2d6f595e1e4220df01ea4b /sdm/libs/core/fb/hw_device.cpp
parent942860a2422681720d5d0a5992666679acbddf39 (diff)
parente5920040e54375f1b47fa78af622dd8c49fe188f (diff)
downloaddisplay-d01eb7b89e772b1600d2095523a2dc5dd4fa7558.tar.gz
Merge "sdm: core: Handle ESHUTDOWN error from fb driver"
Diffstat (limited to 'sdm/libs/core/fb/hw_device.cpp')
-rw-r--r--sdm/libs/core/fb/hw_device.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/sdm/libs/core/fb/hw_device.cpp b/sdm/libs/core/fb/hw_device.cpp
index abe0bad6..113560ba 100644
--- a/sdm/libs/core/fb/hw_device.cpp
+++ b/sdm/libs/core/fb/hw_device.cpp
@@ -1101,6 +1101,10 @@ DisplayError HWDevice::SetPPFeatures(PPFeaturesConfig *feature_list) {
DisplayError HWDevice::SetVSyncState(bool enable) {
int vsync_on = enable ? 1 : 0;
if (Sys::ioctl_(device_fd_, MSMFB_OVERLAY_VSYNC_CTRL, &vsync_on) < 0) {
+ if (errno == ESHUTDOWN) {
+ DLOGI_IF(kTagDriverConfig, "Driver is processing shutdown sequence");
+ return kErrorShutDown;
+ }
IOCTL_LOGE(MSMFB_OVERLAY_VSYNC_CTRL, device_type_);
return kErrorHardware;
}
@@ -1189,6 +1193,10 @@ DisplayError HWDevice::SetScaleLutConfig(HWScaleLutInfo *lut_info) {
cfg.payload = reinterpret_cast<uint64_t>(&mdp_lut_info);
if (Sys::ioctl_(device_fd_, MSMFB_MDP_SET_CFG, &cfg) < 0) {
+ if (errno == ESHUTDOWN) {
+ DLOGI_IF(kTagDriverConfig, "Driver is processing shutdown sequence");
+ return kErrorShutDown;
+ }
IOCTL_LOGE(MSMFB_MDP_SET_CFG, device_type_);
return kErrorHardware;
}