13 Commits

Author SHA1 Message Date
Daniel Vetter
16e44f5499 lib: fixup register access on gen2/3
This wreaked havoc with intel_reg_dumper since it's been broken in

commit c6fe31bc473a7ae44bc42bad7da5faca3c924821
Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
Date:   Thu Jun 21 14:31:34 2012 -0300

    intel_reg_dumper: use intel_register_access_init/fini

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-03 00:22:41 +02:00
Daniel Vetter
50d46750d9 lib/mmio: gen2 has a bigger register window, too
It's split up into two parts, with the gtt pte range in between.
Without this I couldn't read the ADPA register ...
2012-10-12 10:45:52 +02:00
Chris Wilson
7a02aa4cbf mmio: Limit the uc- mapping to only map the registers
In the future, we may like to enable wc mapping of at least the GATT,
and so causing a conflict if we attempt to map the entire bar as uc-
here. Obviously we need a better fallback plan, but for the moment only
attempt to map the portion of the pci space that we use for register
access.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-27 09:34:33 +02:00
Kenneth Graunke
6cfd16648d Remove pointless Android ifdefs for sys/fcntl.h.
On my system, sys/fcntl.h contains exactly one line:

   #include <fcntl.h>

So there's really no need to #ifdef it.  Also, intel_mmio.c already
included <fcntl.h>; there's no need to include it twice.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-11 11:48:02 +01:00
Sateesh Kavuri
b39a74ba4e Added support for Android
Added the Android.mk file as per Android make system. Also had to modify
 the headers with the proper location for fcntl.h as per the Android
 bionic headers location

Signed-off-by: Sateesh Kavuri <sateesh.kavuri@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-10 18:43:53 +01:00
Ben Widawsky
4c20525b7f mmio: refactor reg init/fini
Rearrange register access init and fini so that we properly accomodate
platforms without forcewake.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-01-25 21:04:16 -08:00
Daniel Vetter
137f4d467e lib: forcewake is gen6+
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 09:37:51 +01:00
Daniel Vetter
1be3fd7eee lib: fixup new compiler warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:42:19 +01:00
Alan Coopersmith
4e3c85f153 include <fcntl.h> in lib/intel_mmio.c for open() prototype on Solaris
<fcntl.h> is the POSIX standard specified header for open(), so should
be available on all platforms.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-08 21:49:03 +01:00
Ben Widawsky
abd7038e5a intel-gpu-tools/range handling: register range handling
Hooks to allow safe accesses from userspace. Can revert to old behavior
by using unsafe access.
2011-07-28 13:48:51 -07:00
Ben Widawsky
cac8f8b526 forcewake: Add mmio code to do proper forcewake stuff for gen6 2011-07-28 13:48:51 -07:00
Chris Wilson
41570d9bf5 Remove confusing use of IS_9XX
... and test for what we mean instead.

Reported-by: Diego Celix <dcelix@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-14 15:57:40 +00:00
Chris Wilson
95374225e8 Enable compilation on non-Intel, non-DRM systems.
A few of the tools can be performed post-mortem from a different system,
so it is useful to be able to compile those tools on those foreign
systems. Obviously, any program to interact with the PCI device or talk
to GEM will fail on a non-Intel system.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-04-08 12:17:31 +01:00