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/hwc2_device/HwcDisplay.cpp b/hwc2_device/HwcDisplay.cpp
index 3469c85..fa3bb96 100644
--- a/hwc2_device/HwcDisplay.cpp
+++ b/hwc2_device/HwcDisplay.cpp
@@ -226,7 +226,7 @@
 
   if (ret) {
     ALOGE("Blocking config failed: %d", ret);
-    return HwcDisplay::ConfigError::kBadConfig;
+    return HwcDisplay::ConfigError::kConfigFailed;
   }
 
   ALOGV("Blocking config succeeded.");
diff --git a/hwc2_device/HwcDisplay.h b/hwc2_device/HwcDisplay.h
index acefff8..54e4239 100644
--- a/hwc2_device/HwcDisplay.h
+++ b/hwc2_device/HwcDisplay.h
@@ -45,7 +45,8 @@
     kNone,
     kBadConfig,
     kSeamlessNotAllowed,
-    kSeamlessNotPossible
+    kSeamlessNotPossible,
+    kConfigFailed,
   };
 
   HwcDisplay(hwc2_display_t handle, HWC2::DisplayType type, DrmHwc *hwc);