From patchwork Mon Jun 15 15:30:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 6610211 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ED1BA9F358 for ; Mon, 15 Jun 2015 15:32:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 072B62055A for ; Mon, 15 Jun 2015 15:32:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 273B02053F for ; Mon, 15 Jun 2015 15:32:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B64426E816; Mon, 15 Jun 2015 08:32:28 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C5556E816 for ; Mon, 15 Jun 2015 08:32:27 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 15 Jun 2015 08:32:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,618,1427785200"; d="scan'208";a="743749486" Received: from unknown (HELO localhost) ([10.252.17.208]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2015 08:32:26 -0700 From: Jani Nikula To: Derek Morton , intel-gfx@lists.freedesktop.org In-Reply-To: <1434379789-27250-1-git-send-email-derek.j.morton@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <1434379789-27250-1-git-send-email-derek.j.morton@intel.com> User-Agent: Notmuch/0.19+112~g77230b0 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Mon, 15 Jun 2015 18:30:37 +0300 Message-ID: <878ubl56qq.fsf@intel.com> MIME-Version: 1.0 Cc: thomas.wood@intel.com Subject: Re: [Intel-gfx] [PATCH i-g-t v2] Android.mk: Disable tools that do not build for android X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, 15 Jun 2015, Derek Morton wrote: > Disable the tools / demo code that do not currently build > for android until they can be fixed. > > Affected tools / demos > intel_reg > intel_display_crc > intel_sprite_on The simplest you can do to fix intel_reg is to have configure set up HAVE_SYS_IO or similar and do this in the code: I'm sure it could be made prettier, but this gets the job done. BR, Jani. > > v2: intel_display_crc compiled conditionally on ANDROID_HAS_CAIRO > flag. > > Signed-off-by: Derek Morton > --- > Android.mk | 2 +- > tools/Android.mk | 5 +++++ > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/Android.mk b/Android.mk > index 1ab3e64..681d114 100644 > --- a/Android.mk > +++ b/Android.mk > @@ -1,2 +1,2 @@ > -include $(call all-named-subdir-makefiles, lib tests tools benchmarks demos) > +include $(call all-named-subdir-makefiles, lib tests tools benchmarks) > > diff --git a/tools/Android.mk b/tools/Android.mk > index 39f4512..4be0032 100644 > --- a/tools/Android.mk > +++ b/tools/Android.mk > @@ -37,10 +37,15 @@ endef > > skip_tools_list := \ > intel_framebuffer_dump \ > + intel_reg \ > intel_reg_dumper \ > intel_vga_read \ > intel_vga_write > > +ifneq ("${ANDROID_HAS_CAIRO}", "1") > + skip_tools_list += intel_display_crc > +endif > + > tools_list := $(filter-out $(skip_tools_list),$(bin_PROGRAMS)) > > $(foreach item,$(tools_list),$(eval $(call add_tool,$(item)))) > -- > 1.9.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx diff --git a/tools/intel_reg.c b/tools/intel_reg.c index 090cc25613b9..c1e1d5ed3f1c 100644 --- a/tools/intel_reg.c +++ b/tools/intel_reg.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -38,6 +37,19 @@ #include "intel_reg_spec.h" +#ifdef HAVE_SYS_IO +#include +#else +static inline int _not_supported(void) +{ + fprintf(stderr, "portio-vga not supported\n"); + return 0; +} +#define inb(port) _not_supported() +#define outb(value, port) _not_supported() +#define iopl(level) +#endif + struct config { struct pci_device *pci_dev; char *mmiofile;