summaryrefslogtreecommitdiff
path: root/lib/igt_kms.h
diff options
context:
space:
mode:
authorLyude <lyude@redhat.com>2016-12-12 13:25:39 -0500
committerLyude <lyude@redhat.com>2016-12-13 10:13:48 -0500
commit3ccce99281eaef560334300bb025b770b49ed9b1 (patch)
treee969186d55575809e8c3725776b3c32b2dac8d50 /lib/igt_kms.h
parent6e716b7f5768bb0218d2b5934472ed462560f13b (diff)
igt_kms: Dynamically allocate igt_display->pipes
Many GPUs have more then 3 pipes available, so hard limiting this to I915_MAX_PIPES prevents us from using anything that relies on igt_display_init() on non-intel systems (since we end up writing out of bounds and seg faulting). Fix this by dynamically allocating igt_display->pipes using the number of pipes we've detected on the GPU. Signed-off-by: Lyude <lyude@redhat.com> Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Diffstat (limited to 'lib/igt_kms.h')
-rw-r--r--lib/igt_kms.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 0dcb325c..5234f6c1 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -310,7 +310,7 @@ struct igt_display {
int n_outputs;
unsigned long pipes_in_use;
igt_output_t *outputs;
- igt_pipe_t pipes[I915_MAX_PIPES];
+ igt_pipe_t *pipes;
bool has_cursor_plane;
bool is_atomic;
};