From e5920040e54375f1b47fa78af622dd8c49fe188f Mon Sep 17 00:00:00 2001 From: Rajesh Yadav Date: Tue, 2 Aug 2016 12:49:16 +0530 Subject: sdm: core: Handle ESHUTDOWN error from fb driver Add handling of ESHUTDOWN error from fb driver for ioctl calls. Change-Id: I993487dfccd893231e0deff55d056470213cd09c Crs-fixed: 1045076 --- sdm/libs/core/fb/hw_device.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sdm/libs/core/fb/hw_device.cpp') diff --git a/sdm/libs/core/fb/hw_device.cpp b/sdm/libs/core/fb/hw_device.cpp index 0a72c178..bbb5791e 100644 --- a/sdm/libs/core/fb/hw_device.cpp +++ b/sdm/libs/core/fb/hw_device.cpp @@ -1095,6 +1095,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; } @@ -1183,6 +1187,10 @@ DisplayError HWDevice::SetScaleLutConfig(HWScaleLutInfo *lut_info) { cfg.payload = reinterpret_cast(&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; } -- cgit v1.2.3