summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2013-03-04build: Guard the inclusions of config.h with HAVE_CONFIG_HDamien Lespiau
autoconf can be configured to not generate a config.h but to give the defines with command line arguments instead. In this case, there's no config.h to include. To work in both cases autoconf adds a HAVE_CONFIG_H define on the command line to signal there's a config.h to include. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04lib: Allow to override the device id at run timeDamien Lespiau
Using the same environment variable as libdrm so one doesn't have to remember two different things. This is helpful to run a test under a fake identity, to, say, dump an aub file. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04lib: Factor out a function to check if an environment variable is setDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-03intel_chipset: Fix Haswell CRW PCI IDs.Kenneth Graunke
The second digit was off by one, which meant we accidentally treated GT(n) as GT(n-1). This also meant no support for GT1 at all. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-19intel_chipset: Add multiple inclusion guards into intel_chipset.hVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-19intel_chipset: Use parens around macro argumentsVille Syrjälä
Protect the macro argument evaluations with parens. This is already touching most lines, so while at it, fix up all white space to uniform style throughout the file. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-13lib: Add a way to specify values for "quick" runsDamien Lespiau
In some environments, we don't really want to loop 100000 times or allocate 152352621 buffers because it makes the tests too long to run. This adds a way to specify "quick" values to reduce the time taken by certain tests. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-02add more VLV PCI IDsJesse Barnes
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2012-12-17lib: extract kmstest_get_pipe_from_crtc_idDaniel Vetter
2012-12-06Implement a working gen7 rendercopyChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57825 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-06pci: Search for the first Intel GPU, rather than assume a fixed slotChris Wilson
Everywhere else we search for a match based on an Intel display device, so if the quick check of the fixed slot fails, fallback to walking the PCI bus looking for a match. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-01tools/intel_reg_dumper: add some cpt/ppt debug regsDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-29lib: extract get_render_copyfuncDaniel Vetter
Otherwise we won't update all the tests if we add new render copyfuncs. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28lib/drmtest: subtest infrastructureDaniel Vetter
To make these helpers as least invasive as possible simply initialize the options with a getopt parser and let the control flow be steered with a simple helper which gets the subtest name as an argument. The only tricky part for using it is that the subtest check helper doubles up as the conduit to enumerate tests (and in that mode prevents any test from being run). It is therefore important that nothing gets printed to stdout outside of these checks. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28tests: dont polute stderr if the test succeeds/skipsDaniel Vetter
Results in spurious 'warn' results in piglit. Also don't print progress indicators when not outputting to a terminal. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-16drmtest: add function to remove an DRM FBImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-12lib/mmio: gen2 has a bigger register window, tooDaniel Vetter
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-10fix warn: 'div' shadows a global declarationImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-09lib: remove auto-quiescenting of the gpuDaniel Vetter
In retrospective, this is an ugly idea. Any tests that needs this can call it themselves.
2012-10-09lib: make drmtest_progress more robustDaniel Vetter
2012-10-02lib: helper to convert gem_hanlde to drm_intel_boDaniel Vetter
2012-10-01drmtest: use do_or_dieDaniel Vetter
2012-08-30clang: Fix warnings found through clang.Ben Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-27Add bare-metal interface to adjust cacheing (i.e. snoop status) of a boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-27mmio: Limit the uc- mapping to only map the registersChris Wilson
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-25s/NO_PID/NOP_IDDaniel Vetter
Alan typo'ed it, I've failed to notice :(
2012-08-24Rename NOPID to NO_PID to avoid conflict with Solaris NOPIDAlan Coopersmith
Solaris <sys/types.h> already has #define NOPID (pid_t)(-1) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-21tools: Added intel_dpio_read and intel_dpio_writeVijay Purushothaman
In Valleyview the DPLL and lane control registers are accessible only through side band fabric called DPIO. Added two tools to read and write registers residing in this space. v2: Moved the core read/write functions to lib/intel_dpio.c based on Ben's feedback Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-08tools/reg_dumper: really dump pipe C regsDaniel Vetter
Not just a copy of pipe B. Meh. Also kill a few redudant #define for pipe B - they match pipe A.
2012-08-07lib: add more Haswell PCI IDsPaulo Zanoni
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2012-08-07tools/reg_dumper: dump pipe C regsDaniel Vetter
Also reorder the pipe B regs a bit to be consisten with pipe A.
2012-07-26tests/testdisplay.c: Add a option '-r'.Yi Sun
With the option '-r', the testdisplay could paint a 2-D bar code(QR bar code) on the screen. The word "pass" is hiden in the bar code image. Further more, with this option, testdisplay will wait until a system signal 'SIGUSR1' coming after each mode setting. This function is for another program to control testdisplay. danvet: Fix up the missing static. Signed-off-by: Yi Sun <yi.sun@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-23tests: add basic re-importing prime testDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-23shut up the compiler a bitDaniel Vetter
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-06-30rendercopy_gen7: add support for haswellBen Widawsky
Only compile tested. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-29context: libdrm wrappersBen Widawsky
This wraps libdrm functionality to exec with contexts. This patch shouldn't be applied until libdrm for contexts is updated. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-28lib: add a gen7 rendercopyBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-14context: update for new execbuf2 elementBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-13intel_reg_dumper: dump more PM registersEugeni Dodonov
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-06-11add VLV PCI IDJesse Barnes
This allows the tests to run on the prototype boards.
2012-06-04test/gem_gtt_speed: Add a baseline test for the performance of a CPU mmapChris Wilson
When looking at the pwrite/pread/wc performance, it is useful to judge that against the performance of an ordinary CPU mmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-29lib: fix gen5 workaround emissionDaniel Vetter
Using BEGIN_BATCH can lead to a nice inf recursion through require_space -> flush_batch -> BEGIN_BATCH. Also fix things up to always require BATCH_RESERVED. We need 2 dwords for the gen5 workaround and 2 dwords for MI_BB_END.
2012-05-22lib: extract kmstest_dump_modeDaniel Vetter
2012-05-22lib: extract kmstest_create_fbDaniel Vetter
We should get more kms tests soon, and not needing to copy-paste a nice test pattern should be useful. That establishes a firm depency of i-g-t on cairo over everything, but I don't care so much about that. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-22tests: use drm_open_any moreDaniel Vetter
And fix it up to not leak open fds, which kills all the master only stuff.
2012-05-08tools: add Haswell registers into intel_reg_dumperEugeni Dodonov
For now, only print their content for diffing, but also add the necessary bits that can be used for more verbose output in the fugure. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-28chipset: accidentally left the old IS_GEN7 macroBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-04-25chipset updatesBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-04-22tests: add gem_unfence_active_buffersDaniel Vetter
Unfortunately this requires slab poisoning to catch anything :( Also add a new helper to drmtest to get the available fence count. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-19lib: Fix render copy on gen2Chris Wilson