[Intel-gfx] [PATCH i-g-t 2/3] igt_kms: Change the max number of pipes to 6

Tomeu Vizoso tomeu at tomeuvizoso.net
Wed Dec 7 07:26:56 UTC 2016


On 21 November 2016 at 23:32, Lyude <lyude at redhat.com> wrote:
> Unfortunately the assumption that we only have 6 display pipes available
> is specific to Intel, and seems to be breaking igt_display_init() on
> both radeon and nouveau since this causes us not to leave enough space
> in the igt_display_t struct to hold information for all 6 pipes.
>
> So, up the max to 6. As well, add IGT_MAX_PIPES and use that instead
> since this is no longer specific to Intel. We also leave I915_MAX_PIPES
> defined as 3 so as to not break existing tests relying on this.

Hi Lyude,

we already have igt_display_t.n_pipes for this, which is count_crtcs.

So I think any tests should stop using the hardcoded values and use
the value we get from the kernel instead.

Regards,

Tomeu

> Signed-off-by: Lyude <lyude at redhat.com>
> ---
>  lib/igt_kms.h | 22 +++++++++++++++++++---
>  1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 95d81c3..0ea2454 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -46,7 +46,10 @@
>   * @PIPE_A: First crtc.
>   * @PIPE_B: Second crtc.
>   * @PIPE_C: Third crtc.
> - * @I915_MAX_PIPES: Max number of pipes allowed.
> + * @PIPE_D: Fourth crtc.
> + * @PIPE_E: Fifth crtc.
> + * @PIPE_F: Sixth crtc.
> + * @IGT_MAX_PIPES: Max number of pipes allowed.
>   */
>  enum pipe {
>          PIPE_NONE = -1,
> @@ -54,10 +57,23 @@ enum pipe {
>          PIPE_A = 0,
>          PIPE_B,
>          PIPE_C,
> -        I915_MAX_PIPES
> +       PIPE_D,
> +       PIPE_E,
> +       PIPE_F,
> +       IGT_MAX_PIPES,
>  };
>  const char *kmstest_pipe_name(enum pipe pipe);
>
> +/**
> + * I915_MAX_PIPES:
> + *
> + * The max number of pipes on i915 devices. This should only be used for tests
> + * which are guaranteed to only be used on intel hardware. All other tests
> + * should use @IGT_MAX_PIPES and/or check the number of reported pipes on the
> + * hardware.
> + */
> +#define I915_MAX_PIPES 3
> +
>  /* We namespace this enum to not conflict with the Android i915_drm.h */
>  enum igt_plane {
>         IGT_PLANE_1 = 0,
> @@ -310,7 +326,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[IGT_MAX_PIPES];
>         bool has_universal_planes;
>         bool has_cursor_plane;
>         bool is_atomic;
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list