[Intel-gfx] [PATCH i-g-t 3/7] lib/igt_kms: Make sure that default planes aren't overwritten.

Tomeu Vizoso tomeu at tomeuvizoso.net
Thu Apr 21 10:51:35 UTC 2016


On 20 April 2016 at 16:59,  <robert.foss at collabora.com> wrote:
> From: Robert Foss <robert.foss at collabora.com>
>
> Avoid overwriting planes with statically asigned indices
> with planes that have dynamically assigned indices.
>
> Signed-off-by: Robert Foss <robert.foss at collabora.com>
> ---
>  lib/igt_kms.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 07fb73b..3f953ec 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1326,6 +1326,8 @@ void igt_display_init(igt_display_t *display, int drm_fd)
>                                 display->has_universal_planes = 1;
>                                 break;
>                         default:
> +                               while (p == IGT_PLANE_PRIMARY || p == IGT_PLANE_CURSOR)
> +                                       p++;

Had to read a fair bit of code to understand what's going on here, so
may make sense to add a comment.

Regards,

Tomeu

>                                 plane = &pipe->planes[p];
>                                 plane->index = p++;
>                                 break;
> --
> 2.5.0
>
> _______________________________________________
> 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