diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2016-10-05 13:39:29 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2016-10-05 17:24:49 +0200 |
commit | d8518f3b7e9dcdd8a77f4e48021afd3c37e24d25 (patch) | |
tree | e2c445090f577f9622a7ef7ac9143fd6259f4663 /lib/igt_kms.c | |
parent | 8abe91985b30f8a26cdcb6816d2393956f171ea5 (diff) |
igt_kms: Refresh output when setting pipe.
We still allow duplicates at this point, but when commit is called only
one output per display is allowed.
This fixes tests like kms_psr_sink_crc, which expect a valid pipe.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r-- | lib/igt_kms.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 960ecbd8..989704e1 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1215,13 +1215,16 @@ static void igt_display_log_shift(igt_display_t *display, int shift) igt_assert(display->log_shift >= 0); } -static void igt_output_refresh(igt_output_t *output) +static void igt_output_refresh(igt_output_t *output, bool final) { igt_display_t *display = output->display; unsigned long crtc_idx_mask; + crtc_idx_mask = output->pending_crtc_idx_mask; + /* we mask out the pipes already in use */ - crtc_idx_mask = output->pending_crtc_idx_mask & ~display->pipes_in_use; + if (final) + crtc_idx_mask &= ~display->pipes_in_use; kmstest_free_connector_config(&output->config); @@ -1504,7 +1507,7 @@ void igt_display_init(igt_display_t *display, int drm_fd) output->id = resources->connectors[i]; output->display = display; - igt_output_refresh(output); + igt_output_refresh(output, false); output->config.pipe_changed = true; } @@ -1591,7 +1594,7 @@ static void igt_display_refresh(igt_display_t *display) for (i = 0; i < display->n_outputs; i++) { igt_output_t *output = &display->outputs[i]; - igt_output_refresh(output); + igt_output_refresh(output, true); } } @@ -2462,6 +2465,8 @@ void igt_output_set_pipe(igt_output_t *output, enum pipe pipe) if (pipe != output->config.pipe) output->config.pipe_changed = true; + + igt_output_refresh(output, false); } void igt_output_set_scaling_mode(igt_output_t *output, uint64_t scaling_mode) |