All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2 00/15] Add support for atomic modeset to IGT.
@ 2016-07-06  9:55 Maarten Lankhorst
  2016-07-06  9:55 ` [PATCH i-g-t v2 01/15] igt_kms: Remove kmstest_connector_config.crtc_idx Maarten Lankhorst
                   ` (14 more replies)
  0 siblings, 15 replies; 32+ messages in thread
From: Maarten Lankhorst @ 2016-07-06  9:55 UTC (permalink / raw)
  To: intel-gfx

With legacy modesets if the primary plane had a null fb it was disabled,
and code would often do the following:

for_each_pipe(...)
	for_each_output(...) {
		igt_output_set_pipe(output, pipe);

		igt_display_commit();

		if (!output->valid)
			bail;

		cleanup;
		igt_output_set_pipe(output, PIPE_ANY);
		igt_display_commit();
	}

A straightforward replacement of igt_display_commit with
igt_display_commit2(COMMIT_ATOMIC) will not work with this
series, since in this case it can perform a modeset without
primary framebuffer, and invalid configurations get rejected.

Best solution is to do the following to get atomic behavior,
with fallback to legacy:

bool valid = false;

for_each_pipe_with_valid_output(display, pipe, output) {
	valid = true;

	igt_output_set_pipe(output, pipe);
	/* perform more setup here for planes, etc */
	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);

	/* tests + cleanup */
	igt_output_set_pipe(output, PIPE_NONE);
}

igt_require_f(valid, "no valid crtc/connector combinations found\n");

If the test requires a fixed pipe, use for_each_valid_output_on_pipe instead.

XXX: Make a igt_require_valid_output() for test fixtures?

Unfortunately it made me learn that that setting connector properties with
the atomic api doesn't work yet, needs more tests and changes in the kernel.
But we'll get there, converting encoder api in the kernel to use the atomic
state is a first step.

Changes since first series:
- Silence compiler warning about unused variable 'encoder'.
- Update pan members patch to fix ordering.
- Clean up more tests that rely on outputs with unassigned pipes having
  filled in a default pipe.
- Add kms_atomic_transition
- Add atomic test for fastset panel fitting changes, to ensure no modeset's done.
  Removing the call to intel_update_pipe_config in the kernel caused fifo underruns
  and hw state validator failures, so I think this test works as intended. :-)

Maarten Lankhorst (15):
  igt_kms: Remove kmstest_connector_config.crtc_idx
  igt_kms: Find optimal encoder only after selecting pipe
  kms_psr_sink_crc: Use for_each_pipe_with_valid_output to find a valid
    config.
  igt_kms: Make PIPE_ANY a alias for PIPE_NONE
  tests/kms: Clean up more users of unassigned pipes.
  igt_kms: Change PIPE_ANY behavior to mean unassigned
  igt_kms: Handle atomic pipe properties better.
  igt_kms: Remove pan members from igt_plane, v2.
  igt_kms: Clear all _changed members centrally
  igt_kms: Add modeset support to atomic commits.
  tests: Add kms_rmfb test.
  tests: Add kms_atomic_transition
  igt_kms: Add more apis for panel fitting test.
  igt_kms: Allow disabling previous override mode
  kms_panel_fitting: Add tests for fastboot.

 lib/igt_kms.c                     | 698 +++++++++++++++++++++++---------------
 lib/igt_kms.h                     |  51 ++-
 tests/Makefile.sources            |   2 +
 tests/kms_atomic_transition.c     | 189 +++++++++++
 tests/kms_crtc_background_color.c |   3 +-
 tests/kms_flip_tiling.c           |  50 +--
 tests/kms_panel_fitting.c         | 108 +++++-
 tests/kms_plane.c                 |   8 +-
 tests/kms_plane_scaling.c         |   7 +-
 tests/kms_psr_sink_crc.c          |   5 +-
 tests/kms_rmfb.c                  | 171 ++++++++++
 tests/testdisplay.c               |   4 +-
 12 files changed, 954 insertions(+), 342 deletions(-)
 create mode 100644 tests/kms_atomic_transition.c
 create mode 100644 tests/kms_rmfb.c

-- 
2.5.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2016-07-25 13:04 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06  9:55 [PATCH i-g-t v2 00/15] Add support for atomic modeset to IGT Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 01/15] igt_kms: Remove kmstest_connector_config.crtc_idx Maarten Lankhorst
2016-07-13 12:13   ` Daniel Vetter
2016-07-19 12:52     ` Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 02/15] igt_kms: Find optimal encoder only after selecting pipe Maarten Lankhorst
2016-07-15 11:14   ` Ander Conselvan De Oliveira
2016-07-06  9:55 ` [PATCH i-g-t v2 03/15] kms_psr_sink_crc: Use for_each_pipe_with_valid_output to find a valid config Maarten Lankhorst
2016-07-15 11:15   ` Ander Conselvan De Oliveira
2016-07-19 13:58     ` Ander Conselvan De Oliveira
2016-07-20  7:53       ` Maarten Lankhorst
2016-07-20 12:17         ` Ander Conselvan De Oliveira
2016-07-06  9:55 ` [PATCH i-g-t v2 04/15] igt_kms: Make PIPE_ANY a alias for PIPE_NONE Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 05/15] tests/kms: Clean up more users of unassigned pipes Maarten Lankhorst
2016-07-20 12:56   ` Ander Conselvan De Oliveira
2016-07-21  9:21     ` Maarten Lankhorst
2016-07-25 13:04     ` Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 06/15] igt_kms: Change PIPE_ANY behavior to mean unassigned Maarten Lankhorst
2016-07-21  9:23   ` Ander Conselvan De Oliveira
2016-07-06  9:55 ` [PATCH i-g-t v2 07/15] igt_kms: Handle atomic pipe properties better Maarten Lankhorst
2016-07-21 10:07   ` Ander Conselvan De Oliveira
2016-07-06  9:55 ` [PATCH i-g-t v2 08/15] igt_kms: Remove pan members from igt_plane, v2 Maarten Lankhorst
2016-07-21 11:42   ` Ander Conselvan De Oliveira
2016-07-21 12:37     ` Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 09/15] igt_kms: Clear all _changed members centrally Maarten Lankhorst
2016-07-21 12:13   ` Ander Conselvan De Oliveira
2016-07-21 12:43     ` Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 10/15] igt_kms: Add modeset support to atomic commits Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 11/15] tests: Add kms_rmfb test Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 12/15] tests: Add kms_atomic_transition Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 13/15] igt_kms: Add more apis for panel fitting test Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 14/15] igt_kms: Allow disabling previous override mode Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 15/15] kms_panel_fitting: Add tests for fastboot Maarten Lankhorst

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.