From: Daniel Vetter Subject: Re: [PATCH 3/3] intel-gpu-tools: change how cairo.h is included, to enable Android build Date: Fri, 28 Mar 2014 17:50:23 +0100 Message-ID: <20140328165023.GG22327@phenom.ffwll.local> References: <1396011300-11605-1-git-send-email-tim.gore@intel.com> <1396011300-11605-4-git-send-email-tim.gore@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 741316ED50 for ; Fri, 28 Mar 2014 09:50:28 -0700 (PDT) Received: by mail-ee0-f41.google.com with SMTP id t10so4344990eei.0 for ; Fri, 28 Mar 2014 09:50:27 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1396011300-11605-4-git-send-email-tim.gore@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: tim.gore@intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Mar 28, 2014 at 12:55:00PM +0000, tim.gore@intel.com wrote: > From: tgore > > A recent commit (64401f57e958998d537ff67525d5f1e9a4f76b22) moved > igt_display into igt_kms. This means igt_debugfs.c now needs to > include igt_kms.h, which in turn includes igt_fb.h and hence cairo.h. > This breaks the build on android since there is no cairo port for > Android at present. igt_fb.h doesn't really need cairo.h it can manage > with a couple of incomplete declarations. This then requires igt_fb.c > and several test source files to explicitly include cairo.h, instead > of getting it indirectly through igt_fb.h. This enables us to build > the igt tests that dont require cairo on Android. > > Signed-off-by: Tim Gore Can we just wrap the cairo include in #ifdef ANDROID? The point of adding the cairo include was very much that drivers don't need to do this ... Also Android just needs to grow cairo support ;-) Other two patches merged. -Daniel > --- > lib/Android.mk | 4 +++- > lib/igt_fb.c | 1 + > lib/igt_fb.h | 4 +++- > tests/kms_cursor_crc.c | 1 + > tests/kms_fbc_crc.c | 1 + > tests/kms_plane.c | 1 + > tests/pm_lpsp.c | 1 + > tests/pm_pc8.c | 1 + > 8 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/lib/Android.mk b/lib/Android.mk > index 6735255..1260633 100644 > --- a/lib/Android.mk > +++ b/lib/Android.mk > @@ -33,7 +33,9 @@ include $(LOCAL_PATH)/Makefile.sources > > skip_lib_list := \ > igt_kms.c \ > - igt_kms.h > + igt_kms.h \ > + igt_fb.c \ > + igt_fb.h > > lib_list := $(filter-out $(skip_lib_list),$(libintel_tools_la_SOURCES)) > > diff --git a/lib/igt_fb.c b/lib/igt_fb.c > index ef486f9..6a7b8b1 100644 > --- a/lib/igt_fb.c > +++ b/lib/igt_fb.c > @@ -32,6 +32,7 @@ > #include "drmtest.h" > #include "igt_fb.h" > #include "ioctl_wrappers.h" > +#include > > /** > * SECTION:igt_fb > diff --git a/lib/igt_fb.h b/lib/igt_fb.h > index 5f0ff51..5b2c516 100644 > --- a/lib/igt_fb.h > +++ b/lib/igt_fb.h > @@ -28,11 +28,13 @@ > #ifndef __IGT_FB_H__ > #define __IGT_FB_H__ > > -#include > > #include > #include > > +typedef struct _cairo_surface cairo_surface_t; > +typedef struct _cairo cairo_t; > + > /* helpers to create nice-looking framebuffers */ > struct igt_fb { > uint32_t fb_id; > diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c > index fbb5d88..85f6464 100644 > --- a/tests/kms_cursor_crc.c > +++ b/tests/kms_cursor_crc.c > @@ -27,6 +27,7 @@ > #include > #include > #include > +#include > > #include "drmtest.h" > #include "igt_debugfs.h" > diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c > index 4f56d63..1f2754e 100644 > --- a/tests/kms_fbc_crc.c > +++ b/tests/kms_fbc_crc.c > @@ -26,6 +26,7 @@ > #include > #include > #include > +#include > > #include "drmtest.h" > #include "igt_debugfs.h" > diff --git a/tests/kms_plane.c b/tests/kms_plane.c > index 6bdbca3..3153ace 100644 > --- a/tests/kms_plane.c > +++ b/tests/kms_plane.c > @@ -28,6 +28,7 @@ > #include > #include > #include > +#include > > #include "drmtest.h" > #include "igt_debugfs.h" > diff --git a/tests/pm_lpsp.c b/tests/pm_lpsp.c > index 9d3884c..f053457 100644 > --- a/tests/pm_lpsp.c > +++ b/tests/pm_lpsp.c > @@ -28,6 +28,7 @@ > #include > #include > #include > +#include > > #include "drmtest.h" > #include "igt_kms.h" > diff --git a/tests/pm_pc8.c b/tests/pm_pc8.c > index 0d04323..e9996bc 100644 > --- a/tests/pm_pc8.c > +++ b/tests/pm_pc8.c > @@ -41,6 +41,7 @@ > #include > > #include > +#include > > #include "drmtest.h" > #include "intel_batchbuffer.h" > -- > 1.9.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch