diff options
author | Bhanuprakash Modem <bhanuprakash.modem@intel.com> | 2021-01-18 21:02:52 +0530 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2021-01-27 11:37:55 +0200 |
commit | a85398dcae50930c0e27548cf8c9575ad0bf69d1 (patch) | |
tree | a9f9957698292c7072c65a9915e45797c641afe6 /tests/kms_setmode.c | |
parent | 7ae3d0d68e6bf4c5e404c87b570773d1b3173d47 (diff) |
tests/kms_setmode: Handle conflicting encoders
When conflicting encoders are found, driver will disable other
connectors, instead of failing with -EINVAL. So we endup with
test failures.
This patch will update the logic to expect the failure for the
combinations where all connectors are on the same crtc only.
Cc: Imre Deak <imre.deak@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Diffstat (limited to 'tests/kms_setmode.c')
-rw-r--r-- | tests/kms_setmode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c index 878e149a..16648087 100644 --- a/tests/kms_setmode.c +++ b/tests/kms_setmode.c @@ -255,7 +255,8 @@ static void get_crtc_config_str(struct crtc_config *crtc, char *buf, } } -static void setup_crtcs(drmModeRes *resources, struct connector_config *cconf, +static void setup_crtcs(const struct test_config *tconf, + struct connector_config *cconf, int connector_count, struct crtc_config *crtcs, int *crtc_count_ret, bool *config_valid_ret) { @@ -263,6 +264,7 @@ static void setup_crtcs(drmModeRes *resources, struct connector_config *cconf, int crtc_count; bool config_valid; int i; + drmModeRes *resources = tconf->resources; int encoder_usage_count[resources->count_encoders]; kmstest_unset_all_crtcs(drm_fd, resources); @@ -351,7 +353,8 @@ static void setup_crtcs(drmModeRes *resources, struct connector_config *cconf, drmModeFreeEncoder(encoder); } for (i = 0; i < resources->count_encoders; i++) - if (encoder_usage_count[i] > 1) + if (encoder_usage_count[i] > 1 && + !!(tconf->flags & TEST_SINGLE_CRTC_CLONE)) config_valid = false; *crtc_count_ret = crtc_count; @@ -604,7 +607,7 @@ static void test_one_combination(const struct test_config *tconf, int crtc_count; bool config_valid; - setup_crtcs(tconf->resources, cconfs, connector_count, crtcs, + setup_crtcs(tconf, cconfs, connector_count, crtcs, &crtc_count, &config_valid); if (config_valid == !(tconf->flags & TEST_INVALID)) |