mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 01:16:18 +00:00
lib/display: Check if we're trying to use the same pipe on 2 outputs
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
parent
65fef0a434
commit
162914b9ed
@ -978,10 +978,34 @@ void igt_display_fini(igt_display_t *display)
|
|||||||
|
|
||||||
static void igt_display_refresh(igt_display_t *display)
|
static void igt_display_refresh(igt_display_t *display)
|
||||||
{
|
{
|
||||||
int i;
|
int i, j;
|
||||||
|
|
||||||
display->pipes_in_use = 0;
|
display->pipes_in_use = 0;
|
||||||
|
|
||||||
|
/* Check that two outputs aren't trying to use the same pipe */
|
||||||
|
for (i = 0; i < display->n_outputs; i++) {
|
||||||
|
igt_output_t *a = &display->outputs[i];
|
||||||
|
|
||||||
|
if (a->pending_crtc_idx_mask == -1UL)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for (j = 0; j < display->n_outputs; j++) {
|
||||||
|
igt_output_t *b = &display->outputs[j];
|
||||||
|
|
||||||
|
if (i == j)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (b->pending_crtc_idx_mask == -1UL)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
igt_assert_f(a->pending_crtc_idx_mask !=
|
||||||
|
b->pending_crtc_idx_mask,
|
||||||
|
"%s and %s are both trying to use pipe %c\n",
|
||||||
|
igt_output_name(a), igt_output_name(b),
|
||||||
|
pipe_name(ffs(a->pending_crtc_idx_mask) - 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The pipe allocation has to be done in two phases:
|
* The pipe allocation has to be done in two phases:
|
||||||
* - first, try to satisfy the outputs where a pipe has been specified
|
* - first, try to satisfy the outputs where a pipe has been specified
|
||||||
|
Loading…
x
Reference in New Issue
Block a user