summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitika Dodiya <quic_mdodiya@quicinc.com>2022-07-25 12:02:57 +0530
committerMitika Dodiya <quic_mdodiya@quicinc.com>2022-07-25 17:21:48 +0530
commitfeb2c52ed91b61fae34384832a57c73842d1b0cc (patch)
treefedb30eb8ab59c1301ee32fb6b00ba2a22a4317e
parent8c4562d7a6f9771b6aa7c71b7445b2a9bff535b1 (diff)
display: add check for feature during panel reset
check for spr, demura panel feature support before panel reset Change-Id: I2a353bf0f6d5ef90e4bdc3d4ef11675268043ebc CRs-Fixed: 3252170
-rw-r--r--sde-drm/drm_panel_feature_mgr.cpp13
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