Re: [PATCH i-g-t 2/7] lib/igt_kms: Fix plane counting in igt_display_init.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20 April 2016 at 16:59,  <robert.foss@xxxxxxxxxxxxx> wrote:
> From: Robert Foss <robert.foss@xxxxxxxxxxxxx>
>
> Fix issue where the plane counting fails due to the number and
> configuration of planes being unlike the intel configuration.
>
> Signed-off-by: Robert Foss <robert.foss@xxxxxxxxxxxxx>
> ---
>  lib/igt_kms.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index ef24a49..07fb73b 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1283,6 +1283,7 @@ void igt_display_init(igt_display_t *display, int drm_fd)
>                 igt_plane_t *plane;
>                 int p = IGT_PLANE_2;
>                 int j, type;
> +               uint8_t plane_counter = 0;

nitpick: I think it's more customary to call it n_planes or num_planes.

Regards,

Tomeu

>                 pipe->crtc_id = resources->crtcs[i];
>                 pipe->display = display;
> @@ -1330,8 +1331,10 @@ void igt_display_init(igt_display_t *display, int drm_fd)
>                                 break;
>                         }
>
> +                       plane_counter++;
>                         plane->pipe = pipe;
>                         plane->drm_plane = drm_plane;
> +
>                         if (is_atomic == 0) {
>                                 display->is_atomic = 1;
>                                 igt_atomic_fill_plane_props(display, plane, IGT_NUM_PLANE_PROPS, igt_plane_prop_names);
> @@ -1380,8 +1383,7 @@ void igt_display_init(igt_display_t *display, int drm_fd)
>                         plane->is_cursor = true;
>                 }
>
> -               /* planes = 1 primary, (p-1) sprites, 1 cursor */
> -               pipe->n_planes = p + 1;
> +               pipe->n_planes = plane_counter;
>
>                 /* make sure we don't overflow the plane array */
>                 igt_assert(pipe->n_planes <= IGT_MAX_PLANES);
> --
> 2.5.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux