diff options
author | qctecmdr <qctecmdr@localhost> | 2022-08-01 23:13:03 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2022-08-01 23:13:03 -0700 |
commit | 91aa24bf8ef114d34940d3ef70a7def9c6e4a5e0 (patch) | |
tree | f225c36c8373f7f6e2dd43ca24940740300206cb | |
parent | 14a22c006cda71d43982448183c36c1c6ac7b6d8 (diff) | |
parent | feb2c52ed91b61fae34384832a57c73842d1b0cc (diff) |
Merge "display: add check for feature during panel reset"
-rw-r--r-- | sde-drm/drm_panel_feature_mgr.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sde-drm/drm_panel_feature_mgr.cpp b/sde-drm/drm_panel_feature_mgr.cpp index fe937672..1587b7f3 100644 --- a/sde-drm/drm_panel_feature_mgr.cpp +++ b/sde-drm/drm_panel_feature_mgr.cpp @@ -510,10 +510,19 @@ void DRMPanelFeatureMgr::ResetPanelFeatures(drmModeAtomicReq *req, info.prop_id = kDRMPanelFeatureSPRInit; info.obj_id = token.crtc_id; info.prop_ptr = 0; - ApplyDirtyFeature(req, token, info); + // reset spr if supported + uint32_t prop_id = prop_mgr_.GetPropertyId(drm_property_map_[info.prop_id]); + if (prop_id) { + ApplyDirtyFeature(req, token, info); + } + + // reset demura if supported info.prop_id = kDRMPanelFeatureDemuraInit; - ApplyDirtyFeature(req, token, info); + prop_id = prop_mgr_.GetPropertyId(drm_property_map_[info.prop_id]); + if (prop_id) { + ApplyDirtyFeature(req, token, info); + } } // LCOV_EXCL_STOP |