summaryrefslogtreecommitdiff
path: root/tests/kms_chamelium.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2019-01-17 14:54:11 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2019-02-27 15:30:15 +0100
commitb79007f9c575a538a63ce9301a890ed9e1a45f35 (patch)
tree8a59624026bea62d55eec3116350ff6ddb870505 /tests/kms_chamelium.c
parentb4a6cb85083eb32c3e98d2e5119a0ae5199cc9ec (diff)
kms_chamelium: Fix test failures from missing outputs/unsupported formats, v2.
Newer platforms don't support this format, but the tests don't check if the format is supported on the primary plane. After enabling an output we also don't refresh the output connection, calling igt_output_set_pipe(output, PIPE_NONE) will do so, and prevent skips because no connected output is detected. Changes since v1: - Use igt_plane_has_format_mod (Ville). Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/kms_chamelium.c')
-rw-r--r--tests/kms_chamelium.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index e0715950..c2090037 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -437,6 +437,9 @@ prepare_output(data_t *data,
output = igt_output_from_connector(display, connector);
+ /* Refresh pipe to update connected status */
+ igt_output_set_pipe(output, PIPE_NONE);
+
for_each_pipe(display, pipe) {
if (!igt_pipe_connector_valid(pipe, output))
continue;
@@ -615,6 +618,8 @@ static void test_display_one_mode(data_t *data, struct chamelium_port *port,
primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_assert(primary);
+ igt_require(igt_plane_has_format_mod(primary, fourcc, LOCAL_DRM_FORMAT_MOD_NONE));
+
mode = &connector->modes[0];
if (check == CHAMELIUM_CHECK_ANALOG) {
bool bridge = check_analog_bridge(data, port);
@@ -643,6 +648,7 @@ static void test_display_all_modes(data_t *data, struct chamelium_port *port,
connector = chamelium_port_get_connector(data->chamelium, port, false);
primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_assert(primary);
+ igt_require(igt_plane_has_format_mod(primary, fourcc, LOCAL_DRM_FORMAT_MOD_NONE));
if (check == CHAMELIUM_CHECK_ANALOG)
bridge = check_analog_bridge(data, port);