From 13ead623602b6f60033a2258d17f34094f1418be Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Thu, 21 Sep 2017 12:01:41 +0200 Subject: lib/igt_kms: Rework connector properties to be more atomic, v2. In the future I want to allow tests to commit more properties, but for this to work I have to fix all properties to work better with atomic commit. Instead of special casing each property make a bitmask for all property changed flags, and try to commit all properties. Changs since v1: - Mention which properties we set to what. - Assert the property to be set is valid. Signed-off-by: Maarten Lankhorst Reviewed-by: Mika Kahola --- tests/kms_atomic_interruptible.c | 4 ++-- tests/kms_panel_fitting.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/kms_atomic_interruptible.c b/tests/kms_atomic_interruptible.c index a9f9cb13..dcdbc267 100644 --- a/tests/kms_atomic_interruptible.c +++ b/tests/kms_atomic_interruptible.c @@ -161,7 +161,7 @@ static void run_plane_test(igt_display_t *display, enum pipe pipe, igt_output_t plane->pipe->atomic_props_crtc[IGT_CRTC_MODE_ID], plane->pipe->atomic_props_crtc[IGT_CRTC_ACTIVE], /* connector: 1 prop */ - output->config.atomic_props_connector[IGT_CONNECTOR_CRTC_ID], + output->props[IGT_CONNECTOR_CRTC_ID], /* plane: remainder props */ plane->atomic_props_plane[IGT_PLANE_CRTC_ID], plane->atomic_props_plane[IGT_PLANE_FB_ID], @@ -206,7 +206,7 @@ static void run_plane_test(igt_display_t *display, enum pipe pipe, igt_output_t case test_legacy_dpms: { struct drm_mode_connector_set_property prop = { .value = DRM_MODE_DPMS_OFF, - .prop_id = output->config.atomic_props_connector[IGT_CONNECTOR_DPMS], + .prop_id = output->props[IGT_CONNECTOR_DPMS], .connector_id = output->id, }; diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c index 85a231e6..e4ea3556 100644 --- a/tests/kms_panel_fitting.c +++ b/tests/kms_panel_fitting.c @@ -275,7 +275,7 @@ static void test_atomic_fastset(igt_display_t *display) igt_require(intel_gen(intel_get_drm_devid(display->drm_fd)) >= 5); for_each_pipe_with_valid_output(display, pipe, output) { - if (!output->config.atomic_props_connector[IGT_CONNECTOR_SCALING_MODE]) + if (!output->props[IGT_CONNECTOR_SCALING_MODE]) continue; test_panel_fitting_fastset(display, pipe, output); -- cgit v1.2.3