drm_hwcomposer: Return an error corresponding to EX_CONFIG_FAILED for config failure
This commit adds a new ConfigError::kConfigFailed corresponding to the new
exception EX_CONFIG_FAILED.
SetConfig() should return this error if the requested config fails to be
committed.
Bug: b/391891910
Test: m drm_hwcomposer
Change-Id: Ie2ca26ff870324dc9016d32ffeb4382608f4d140
Signed-off-by: Manasi Navare <navaremanasi@google.com>
diff --git a/hwc3/ComposerClient.cpp b/hwc3/ComposerClient.cpp
index 13fc7d9..b88a383 100644
--- a/hwc3/ComposerClient.cpp
+++ b/hwc3/ComposerClient.cpp
@@ -1120,6 +1120,8 @@
return ToBinderStatus(hwc3::Error::kSeamlessNotAllowed);
case HwcDisplay::ConfigError::kSeamlessNotPossible:
return ToBinderStatus(hwc3::Error::kSeamlessNotPossible);
+ case HwcDisplay::ConfigError::kConfigFailed:
+ return ToBinderStatus(hwc3::Error::kConfigFailed);
case HwcDisplay::ConfigError::kNone:
return ndk::ScopedAStatus::ok();
}
diff --git a/hwc3/Utils.h b/hwc3/Utils.h
index b322f5d..9389286 100644
--- a/hwc3/Utils.h
+++ b/hwc3/Utils.h
@@ -39,6 +39,7 @@
kUnsupported = IComposerClient::EX_UNSUPPORTED,
kSeamlessNotAllowed = IComposerClient::EX_SEAMLESS_NOT_ALLOWED,
kSeamlessNotPossible = IComposerClient::EX_SEAMLESS_NOT_POSSIBLE,
+ kConfigFailed = IComposerClient::EX_CONFIG_FAILED,
};
} // namespace hwc3