[igt-dev] [i-g-t] tests/kms_setmode: Handle unsupported modes for invalid crtc test
Tejas Upadhyay
tejaskumarx.surendrakumar.upadhyay at intel.com
Thu Aug 19 07:42:54 UTC 2021
Unsupported modes in crtc need to return proper error in order
to report back that applied config was failed or not. Thus added
ENOENT error.
Test affected (fail -> pass after change) :
igt at kms_setmode@invalid-clone-single-[crtc|crtc-stealing]
Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay at intel.com>
---
tests/kms_setmode.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index 89220b83..f322a373 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -569,8 +569,10 @@ int __test_crtc_config(struct crtc_config *crtcs, int crtc_count,
for (int i = 0; i < crtc->cconfs->connector->count_modes; i++) {
uint32_t *ids;
- if (!crtc_supports_mode(crtc, &crtc->cconfs->connector->modes[i]))
+ if (!crtc_supports_mode(crtc, &crtc->cconfs->connector->modes[i])) {
+ ret = -ENOENT;
continue;
+ }
crtc->mode = crtc->cconfs->connector->modes[i];
@@ -622,6 +624,9 @@ int __test_crtc_config(struct crtc_config *crtcs, int crtc_count,
return ret;
}
+ if (ret < 0)
+ *config_failed = true;
+
/* When all crtcs[base].modes are tried & failed to fit into link BW. */
return ret;
}
--
2.31.1
More information about the igt-dev
mailing list