[Intel-gfx] [PATCH 3/3] overlay: remove crtc<->pipe mapping code from kms-overlay

Thomas Wood thomas.wood at intel.com
Tue Sep 8 04:07:37 PDT 2015


On 4 September 2015 at 19:22, Micah Fedke <micah.fedke at collabora.co.uk> wrote:
> the crtc id is now always equivalent to its index in the array of crtcs
> returned by the kernel
>
> ---
>  overlay/Makefile.am       | 4 ++--
>  overlay/kms/kms-overlay.c | 7 ++-----
>  2 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/overlay/Makefile.am b/overlay/Makefile.am
> index c648875..c82026c 100644
> --- a/overlay/Makefile.am
> +++ b/overlay/Makefile.am
> @@ -3,8 +3,8 @@ bin_PROGRAMS = intel-gpu-overlay
>  endif
>
>  AM_CPPFLAGS = -I.
> -AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(OVERLAY_CFLAGS)
> -LDADD = $(DRM_LIBS) $(PCIACCESS_LIBS) $(CAIRO_LIBS) $(OVERLAY_LIBS)
> +AM_CFLAGS = $(LIBUNWIND_CFLAGS) $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(OVERLAY_CFLAGS)
> +LDADD = ../lib/libintel_tools.la $(LIBUNWIND_LIBS) $(DRM_LIBS) $(PCIACCESS_LIBS) $(CAIRO_LIBS) $(OVERLAY_LIBS)

It might be better to use $(top_builddir)/lib/libintel_tools.la here.

>
>  intel_gpu_overlay_SOURCES = \
>         i915_pciids.h \
> diff --git a/overlay/kms/kms-overlay.c b/overlay/kms/kms-overlay.c
> index cfb3d5a..1d85729 100644
> --- a/overlay/kms/kms-overlay.c
> +++ b/overlay/kms/kms-overlay.c
> @@ -38,6 +38,7 @@
>  #include <xf86drmMode.h>
>  #include <i915_drm.h>
>  #include "../overlay.h"
> +#include "../../lib/igt_kms.h"

Please add -I$(top_srcdir)/lib to CFLAGS and include "igt.h".

>  //#include "rgb2yuv.h"
>
>  #ifndef ALIGN
> @@ -244,11 +245,7 @@ kms_overlay_create(struct config *config, int *width, int *height)
>
>                 get_pipe.pipe = 0;
>                 get_pipe.crtc_id = kmode->crtcs[i];
> -               if (drmIoctl(priv->fd,
> -                            DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID,
> -                            &get_pipe)) {
> -                       continue;
> -               }
> +               get_pipe.pipe = kmstest_get_pipe_from_crtc_id(priv->fd, get_pipe.crtc_id);
>
>                 if (get_pipe.pipe != pipe)
>                         continue;
> --
> 2.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list